Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2005-07-18 21:34:12


The xml_wiarchve and xml_woarechive do use UTF-8. The specific case
reported by the user is a std::wstring with a '\0' in the middle of it.
Using UTF-8 doesn't address the issue.

Robert Ramey

Darren Cook wrote:
>> Basically we want to map anything that might be contain in a
>> std::string or std::wstring
>> to an XML value string. I little investigation makes me think that
>> the appropriate
>> mechanism is to escape all "non-printable" (uh-oh?) or some subset of
>> "problem characters"
>> using the % escape syntax. It looks to me as non-obvious problem
>> but I have yet to delve into it.
>
> I think if you used UTF-8 as the output character set you avoid all
> these problems. The conversion from UCS-2, etc. to UTF-8 is fairly
> straightforward, and should be at least as quick as using %. Most
> importantly it is more compact (e.g. for Japanese characters 2-3 bytes
> instead of 6 bytes for %XX%XX).
>
> Darren
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk