[xsd-users] Serialization and accent
boris at codesynthesis.com
Fri Feb 26 03:01:40 EST 2010
Julien KHONG <julienkhong at yahoo.fr> writes:
> When i try to serialize the value "système" to a file, i get an exception
> CharsetTest ct("système");
By default the character data in the object model is encoded in UTF-8.
That is, when an XML file is parsed into the object model, all the text
data is converted to UTF-8. Similarly, when the object model is serialized
to XML, the text data is expected to be in UTF-8. So the 'è' letter has to
be represented as a two-byte pair:
Alternatively, you cat upgrade to XSD 3.3.0.b1 (see the download page,
the final release should be out mid-March) which not provides the
--char-encoding option. If you specify:
Then your code should work without any modifications.
More information about the xsd-users