Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2008-08-12 12:31:16


the wide character xml archives use UTF8.

the narrow character xml archives use the currently set locale.

Robert Ramey

Martin Trappel wrote:
> Mathieu Peyréga wrote:
>> Hello,
>>
>> I'm currently writting an open source and portable (Win32 / OS X /
>> Linux) software, and i'm using parts of boost libraries, especially
>> for the issue described here :
>>
>> - boost serialization
>> - boost filesystem
>>
>> At some point, i'm storing a directory name (as a std::string) into a
>> xml file through boost serialization library.
>>
>> The encoding occurs on a windows platform, and as far as i can
>> understand (i'm really new to all these character set issues) it
>> seems to be done in win1252 character set.
>>
> If it's an xml file there is no 'seems'. An XML file always has a well
> defined encoding or else it's tag-soup - or whatever the term :)
>
> The filename in the std::string however may well be win1252, and I'd
> say this is already a problem, because on Windows path-elements are
> Unicode encoded and if you use a singlebyte character set you will
> always hit problems sooner or later.
> I recommend encoding the path elements as UTF-8 if you want to stick
> with std::string.
>
>> (...)
>
> br,
> Martin


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net