Boost logo

Boost :

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


On Mon, Jun 12, 2017 at 8:39 PM, Artyom Beilis via Boost <
boost_at_[hidden]> wrote:

> Please note: Under POSIX platforms no conversions are performed
> and no UTF-8 validation is done as this is incorrect:
>
> http://cppcms.com/files/nowide/html/index.html#qna
>
> The only case is when Windows Wide API returns/creates
> invalid UTF-16 - which can happen only when invalid surrogate
> UTF-16 pairs are generated - and they have no valid UTF-8
> representation.
>
> On the other hand creating deliberately invalid UTF-8 is very problematic
> idea.
>

That's not convincing. Why Windows has to be different in this regard? In
both cases, Windows or POSIX, valid input gives valid UTF-8, and invalid
input can give 'invalid' UTF-8. I expect the library to be as transparent
layer as possible and not to interfere with such issues.

-- 
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