Boost logo

Boost :

Subject: Re: [boost] [review] Review of Nowide (Unicode)
From: Sergey Cheban (sergey.cheban_at_[hidden])
Date: 2017-06-21 15:19:17


21.06.2017 3:42, Gavin Lambert via Boost пишет:

> Isn't the problem case where you get an arbitrary-block-of-bytes
> (UTF-8-ish in POSIX and UTF-16-ish in Windows) filename from some other
> API (eg. readdir), convert to really-UTF-8 for internal use (eg.
> manipulation, display), and then go back to the OS to try to actually
> use that filename and get an unexpected "file not found" because it
> didn't round-trip?
Please note that even WinApi is unable to handle some malformed
filenames correctly (the ones with \0 in the middle, for example). So, I
believe Nowide shouldn't try to work with them.
I think only chkdsk/fsck should deal with files that have malformed
names. For other tools, it is ok to fail on invalid utf16.

--
Best regards,
Sergey Cheban

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