From 76d23e639004517db8f9469d64ac1789f8449365 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 7 Jan 2010 13:50:11 +0200 Subject: 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. --- libxsde/xsde/cxx/parser/expat/xml-error.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'libxsde/xsde/cxx/parser/expat/xml-error.cxx') 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 (e)) + : text_[e & 0xFFFF]; } } } } } - -- cgit v1.1