aboutsummaryrefslogtreecommitdiff
path: root/libxsde/xsde/cxx/parser/expat/xml-error.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-01-07 13:50:11 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-01-07 13:50:11 +0200
commit76d23e639004517db8f9469d64ac1789f8449365 (patch)
treedbafc8c4e31a97f74046c98af19d0fe76f360001 /libxsde/xsde/cxx/parser/expat/xml-error.cxx
parentc30caae30bc64974eeaa1e81aa2abdc203f5120d (diff)
Add support for ISO-8859-1 as application encoding
New runtime configuration parameter, XSDE_ENCODING. New option, --char-encoding. New test, tests/cxx/hybrid/iso8859-1.
Diffstat (limited to 'libxsde/xsde/cxx/parser/expat/xml-error.cxx')
-rw-r--r--libxsde/xsde/cxx/parser/expat/xml-error.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/libxsde/xsde/cxx/parser/expat/xml-error.cxx b/libxsde/xsde/cxx/parser/expat/xml-error.cxx
index cb7b904..b5f15a4 100644
--- a/libxsde/xsde/cxx/parser/expat/xml-error.cxx
+++ b/libxsde/xsde/cxx/parser/expat/xml-error.cxx
@@ -13,13 +13,19 @@ namespace xsde
{
namespace expat
{
+ static const char* const text_[] =
+ {
+ "character unrepresentable in application encoding"
+ };
+
const char*
xml_error_text (xml_error e)
{
- return XML_ErrorString (e);
+ return e < 0x10000
+ ? XML_ErrorString (static_cast<XML_Error> (e))
+ : text_[e & 0xFFFF];
}
}
}
}
}
-