Boost logo

Boost :

Subject: Re: [boost] Boost.Locale (was Re: [SQL-Connectivity] Is Boost interested in CppDB?)
From: Artyom (artyomtnk_at_[hidden])
Date: 2010-12-14 13:53:19


> On 12/14/2010 9:53 AM, Dean Michael Berris wrote:
> > +1 -- if there was a library that did easy conversion from
> > std::wstring (usually the default in Windows now) to proper UTF-8
> > encoded std::string in Boost that would be *awesome*. I can totally
> > use that library in cpp-netlib too. ;)
>
> Please, no. std::string is not an appropriate holder for a UTF-8 string.
> It encourages random-access mutation of any byte in a UTF-8 sequence,
> pretty much guaranteeing data corruption.
>

As well as std::wstring, just of of developers do not aware of it
(that UTF-16 is variable length encoding)

Artyom

      


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