[Python-Dev] Re: PEP 277: Unicode file name support for Windows NT, was PEP-time ? ...

Neil Hodgson nhodgson@bigpond.net.au
Wed, 16 Jan 2002 12:08:34 +1100


Martin v. Loewis:

> I'm still not certain what the meaning of this function is, if it
> means "Unicode file names are only restricted by the file system
> conventions", then on Unix, it may change at run-time, if a user or
> the application sets an UTF-8 locale, switching from the original "C"
> locale.

   The underlying motivation of the function is for code to be able to ask
"Is it better to pass Unicode strings to file operations"? For me the main
criterion for "better" is whether all files are accessible. It is best to
determine this through a test that does not require writing or that is
dependent on the user's setup, such as having a "C:" drive.

   Switching to a UTF-8 locale on Unix will make files inaccessible where
their names contain illegal UTF-8 sequences.

   Neil