Subject: Re: [boost] [review] Review of Nowide (Unicode) starts today
From: Peter Dimov (lists_at_[hidden])
Date: 2017-06-12 17:52:55
Artyom Beilis wrote:
> > 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.
That's what I meant, already existing files that can't be manipulated by the
Incidentally, the mention of FileFindW leads me to my next question: by
looking at my own collection of functions that basically mirror what Nowide
does (everyone has his own Nowide, I suppose, as this is the only sane way
to program), I see 'stat' and a 'readdir' equivalent.
Have you considered providing these? One could go the filesystem route, of
course, but sometimes one may wish to minimize dependencies.
> 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.
Well yes in principle, but the file already exists. Although one can well
argue that this is no different from putting ':' in the name or something