Boost logo

Boost :

Subject: Re: [boost] [general] What will string handling inC++ looklike inthe future [was Always treat ... ]
From: Peter Dimov (pdimov_at_[hidden])
Date: 2011-01-19 18:50:30


Mathias Gaunard wrote:
> On 19/01/2011 22:02, Peter Dimov wrote:
>
> > - on Windows, this string is UTF-8 and is converted to UTF-16 before
> > being given to the OS, and converted from UTF-16 after being received
> > from it. This conversion should tolerate broken UTF-16 because the OS
> > does so as well.
>
> I see no need to tolerate bad practices if they cause obvious problems.

It is possible to create a file whose name is not a valid UTF-16 sequence on
Windows, so the library ought to be able to work with it. You could go
either way in this specific case though, since such names are extremely rare
in practice.


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