All appearances, I have same trouble.
I try to create a client-server app.
sqlite DB encoding is UTF-8.
When I use "serialization_xml" I receive "?????" instead of cyrillic string on the client side.
But note:
- immediately after "fetch" operation on the server side the class's field of QString type contains normal cyrillic symbols.
- but on the client side - after de-/serialization - the QString-field contains "?????" symbols.
And note when I use "serialization_binary", all ok with cyrillic symbols.
I have found following info in the boost docs:
The current library defines in 3 formats (text, binary, and XML), wide and narrow characters, an attempts to be portable between compiler libraries.
...
- character XML archives (i.e. xml_oarchive) will produce XML output with characters encoded according to the current stream locale.
- wide character XML archives (i.e. xml_woarchive) will produce files encoded in UTF-8.
This character encoding is implemented by changing the locale of the i/o stream used by an archive when the archive is constructed, the stream local is changed back to its original value. This action can be overridden by specifying boost::archive::no_codecvt when the archive is opened. In this case, the stream locale will not be changed by the serialization library.
...
http://www.boost.org/doc/libs/1_51_0/li ... arencodingI suppose this can be the cause of our trouble. But I don't know, how to check my guess. Can you tell me if my guess is correct?