
19 Jan
2011
19 Jan
'11
11:50 p.m.
Mathias Gaunard wrote:
On 19/01/2011 22:02, Peter Dimov wrote:
- on Windows, this string is UTF-8 and is converted to UTF-16 before being given to the OS, and converted from UTF-16 after being received from it. This conversion should tolerate broken UTF-16 because the OS does so as well.
I see no need to tolerate bad practices if they cause obvious problems.
It is possible to create a file whose name is not a valid UTF-16 sequence on Windows, so the library ought to be able to work with it. You could go either way in this specific case though, since such names are extremely rare in practice.