aboutsummaryrefslogtreecommitdiff
path: root/xsd/cxx/parser/validator.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2009-12-08 16:18:01 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2009-12-08 16:18:01 +0200
commit1ca6396a3dd284241de11bcaa210ad5836e8e5a8 (patch)
tree465c19f0d668a91bb556d748911847acfb80cb09 /xsd/cxx/parser/validator.cxx
parentd71611d5fb575078bdf573c35257bb86bb7054e0 (diff)
Multiple object model character encodings support
Also add support for ISO-8859-1.
Diffstat (limited to 'xsd/cxx/parser/validator.cxx')
-rw-r--r--xsd/cxx/parser/validator.cxx17
1 files changed, 15 insertions, 2 deletions
diff --git a/xsd/cxx/parser/validator.cxx b/xsd/cxx/parser/validator.cxx
index 526c941..9b5d967 100644
--- a/xsd/cxx/parser/validator.cxx
+++ b/xsd/cxx/parser/validator.cxx
@@ -27,7 +27,7 @@ namespace CXX
CLI::Options const& options,
const WarningSet& disabled_warnings,
Boolean& valid_)
- : Context (std::wcerr, root, options, 0, 0, 0),
+ : Context (std::wcerr, root, options, 0, 0, 0, 0),
disabled_warnings_ (disabled_warnings),
disabled_warnings_all_ (false),
valid (valid_),
@@ -584,7 +584,20 @@ namespace CXX
if (options.value<CLI::xml_parser> () == "expat" &&
options.value<CLI::char_type> () == "wchar_t")
{
- wcerr << "error: using expat with wchar_t is not yet supported"
+ wcerr << "error: using expat with wchar_t is not supported"
+ << endl;
+
+ return false;
+ }
+
+ //
+ //
+ if (options.value<CLI::xml_parser> () == "expat" &&
+ !options.value<CLI::char_encoding> ().empty () &&
+ options.value<CLI::char_encoding> () != "utf8")
+ {
+ wcerr << "error: using expat with character encoding other than "
+ << "utf8 is not supported"
<< endl;
return false;