[xsd-users] Encoding 'ru_RU.cp1251' trouble.

Boris Kolpackov boris at codesynthesis.com
Thu Jul 31 08:46:49 EDT 2008


Hi Alexander,

Alexander A. Prokhorov <prokher at gmail.com> writes:

> This small program gets word from stdin and outputs xml to stdout. It 
> coredumps with exception "terminate called after throwing an instance of 
> 'xsd::cxx::xml::invalid_utf8_string'" if I input word in ru_RU.cp1251 
> encoding. How can I fix this?

All strings in the object model can contains characters encoded using
one of the following three ways:

1. char/UTF-8 (default)
2. char/local code page
3. wchar_t/UTF-32 or UTF-16, depending on the size of wchar_t

See Q 1.2 in the C++/Tree Mapping FAQ for details: 

http://wiki.codesynthesis.com/Tree/FAQ

In your case, choosing options (2) might do the trick through this
might not work on some platforms as mentioned in the FAQ.

Boris




More information about the xsd-users mailing list