
19 Jul
2005
19 Jul
'05
10:29 a.m.
On Tue, Jul 19, 2005 at 05:12:57PM +0900, Darren Cook wrote:
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.
Sorry, I thought you meant the zero byte was part of a multi-byte character. Converting to UTF-8 solves that (?).
But you just mean a standalone \0 character? Doesn't that mean the problem applies to serializing std::string as well?
Yes, it will. The root of the problem is that std::string and std::wstring can contain any arbitrary sequence of characters, including NULs. jon