Subject: Re: [boost] [review] Review of Nowide (Unicode) starts today
From: Peter Dimov (lists_at_[hidden])
Date: 2017-06-13 15:08:48
Artyom Beilis wrote:
> Note, under POSIX user takes strings as is and can't trust the source.
> Under Windows it need to convert them using nowide which can give him
> false assumption that it receives valid UTF-8.
What use case are we discussing here?
Is it the one where the user gets a path from an external source and passes
it to Nowide? In which case Nowide does no validation on POSIX and strict
UTF-8 validation on Windows? Giving the Windows user the false assumption
that Nowide validates, which turns out to not happen in a later POSIX port.
Or is it the one where the user receives a path from Nowide? Which currently
doesn't occur anywhere, because the library does not return paths, it only
takes them as arguments. (It would occur if you add `readdir`.)
> Once again I have no problem providing wtf8 to wide and other way around
> functions when user EXPLICITLY says it.
How would portable user code look like in this scenario?