Boost logo

Boost :

Subject: Re: [boost] [review] Review of Nowide (Unicode) starts today
From: Yakov Galka (ybungalobill_at_[hidden])
Date: 2017-06-12 18:36:23


On Mon, Jun 12, 2017 at 9:30 PM, Peter Dimov via Boost <
boost_at_[hidden]> wrote:

> Yakov Galka wrote:
>
> That's not convincing. Why Windows has to be different in this regard?
>>
>
> Because it is. The file name on Windows physically is a sequence of
> uint16_t, whereas on Linux, it's a sequence of uint8_t. On Linux, any
> null-terminated byte sequence results in a perfect roundtrip, as it's
> stored unmodified, it's literally the exact same byte sequence as the one
> you gave. If the library tried to mess with the file name in any way, this
> would result in nothing but problems.
>
> On Windows, it is simply not possible to have the exact same byte sequence
> stored as the file name. The file system does not use byte sequences, it
> uses uint16_t sequences.
>

Yeah, so? I say that the library can provide a Windows -> std::string ->
Windows roundtrip just as it does with any other platform. If FreeBSD ->
std::string conversion can return invalid UTF-8, then so does Windows ->
std::string conversion.

-- 
Yakov Galka
http://stannum.co.il/

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