12 Jun
2017
12 Jun
'17
2:58 p.m.
On Mon, Jun 12, 2017 at 3:11 PM, Peter Dimov via Boost
Artyom Beilis wrote:
Converting invalid UTF-16 to WTF-8 and other way around is not obvious behavior and has potential of security risk especially for users that are not aware of such an issue. So invalid UTF-8/16 sequences are rejected by design.
Implying that there are Windows file names (that their names contain invalid UTF-16) that can't be handled by the library?
Yes indeed if you will try to use stuff like FindFileW and it returns invalid UTF-16 you will get an error trying to convert it to UTF-8. By definition: you can't handle file names that can't be represented in UTF-8 as there is no valid UTF-8 representation exist. Artyom