On Mon, Jun 12, 2017 at 8:39 PM, Artyom Beilis via Boost < boost@lists.boost.org> 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/