[Python-Dev] Unicode strings as filenames

Neil Hodgson nhodgson@bigpond.net.au
Wed, 9 Jan 2002 08:55:14 +1100


Martin:

> That has unclear semantics for me. It sounds like "if true, you can
> pass Unicode strings to open etc." However, then it should return 1 on
> all systems, since you always can - the default encoding may apply,
> and restrict file names to ASCII. Or, it may mean "if true, you can
> pass all Unicode strings to open". This is not true, either, because
> there are always reserved characters (such as the path delimiter).

   OK, it means:

   If true, the underlying system supports file names containing most
Unicode characters and any valid file name may be passed to open as a
Unicode string.

   Yes, the "most" is fuzzy but just as with normal strings, the file system
gets to put special meaning on delimiters, restrict file name length, and
disallow characters such as  \u0000.

> > After waiting a while for comments, I'll package this up as a patch.
>
> Very good. Would you also write the PEP? If not, I will, but that may
> take some time.

   I'll try in the next day or so but may bail if not able to work on it
much as I have some backlog from spending time on this rather than other
projects.

   Neil