Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2005-07-20 00:12:22


That's the solution for '\0'. Its just not obvious to me that that is the
whole problem. What about '\01' ? or non-printable characters in general?
Does the encoding come into play? How? These are questions I don't
currently have an answer to.

Robert Ramey

Lucas Galfaso wrote:
> I am still not sure that you can not put a representation of the
> character \0 inside an XML, but if it were possible, the natural
> representation would be "�" (without the quotes) Why not just use
> it?
>
> \TM
>
> "Jonathan Wakely" <cow_at_[hidden]> wrote in message
> news:20050719102904.GC92286_at_compsoc.man.ac.uk...
>> 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
>>
>> _______________________________________________
>> Unsubscribe & other changes:
>> http://lists.boost.org/mailman/listinfo.cgi/boost
>>
>
>
>
> _______________________________________________
> 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