Boost logo

Boost :

Subject: Re: [boost] [review] Review of Nowide (Unicode) starts today
From: Vadim Zeitlin (vz-boost_at_[hidden])
Date: 2017-06-12 15:05:50


On Mon, 12 Jun 2017 17:58:32 +0300 Artyom Beilis via Boost <boost_at_[hidden]> wrote:

AB> By definition: you can't handle file names that can't be represented
AB> in UTF-8 as there is no valid UTF-8 representation exist.

 This is a nice principle to have in theory, but very unfortunate in
practice because at least under Unix systems such file names do occur in
the wild (maybe less often now than 10 years ago, when UTF-8 was less
ubiquitous, but it's still hard to believe that the problem has completely
disappeared). And there are ways to solve it, e.g. I think glib represents
such file names using special characters from a PUA and there are other
possible approaches, even if, admittedly, none of them is perfect.

 While it is reasonable to restrict the file names created by the program
to valid UTF-8, not allowing certain existing files to be opened at all is,
IMHO, not a good idea and probably has security implications as well.

 Regards,
VZ




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