diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-01-07 13:50:11 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-01-07 13:50:11 +0200 |
commit | 76d23e639004517db8f9469d64ac1789f8449365 (patch) | |
tree | dbafc8c4e31a97f74046c98af19d0fe76f360001 /documentation/cxx/parser/guide/index.xhtml | |
parent | c30caae30bc64974eeaa1e81aa2abdc203f5120d (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 'documentation/cxx/parser/guide/index.xhtml')
-rw-r--r-- | documentation/cxx/parser/guide/index.xhtml | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/documentation/cxx/parser/guide/index.xhtml b/documentation/cxx/parser/guide/index.xhtml index 305c420..6a019c5 100644 --- a/documentation/cxx/parser/guide/index.xhtml +++ b/documentation/cxx/parser/guide/index.xhtml @@ -1991,8 +1991,27 @@ age: 28 <p>While the XML documents can use various encodings, the Embedded C++/Parser mapping always delivers character data to the application - in the UTF-8 encoding. The underlying XML parser used by the - Embedded C++/Parser mapping includes built-in support for XML + in the same encoding. The application encoding can either be UTF-8 + (default) or ISO-8859-1. To select a particular encoding, configure + the XSD/e runtime library accordingly and pass the <code>--char-encoding</code> + option to the XSD/e compiler when translating your schemas.</p> + + <p>When using ISO-8859-1 as the application encoding, XML documents + being parsed may contain characters with Unicode values greater + than 0xFF which are unrepresentable in the ISO-8859-1 encoding. + By default, in such situations parsing will terminate with + an error. However, you can suppress the error by providing a + replacement character that should be used instead of + unrepresentable characters, for example:</p> + + <pre class="c++"> +xml_schema::iso8859_1::unrep_char ('?'); + </pre> + + <p>To revert to the default behavior, set the replacement character + to <code>'\0'</code>.</p> + + <p>The Embedded C++/Parser mapping includes built-in support for XML documents encoded in UTF-8, UTF-16, ISO-8859-1, and US-ASCII. Other encodings can be supported by providing application-specific decoder functions.</p> |