[Python-3000] [Python-Dev] Filename as byte string in python 2.6 or 3.0?

"Martin v. Löwis" martin at v.loewis.de
Wed Oct 8 00:05:45 CEST 2008


> The posix version should hardcode it as b'/'; I only meant windows to
> use UTF-16.  You could perhaps use sys.getfilesystemencoding(), but
> I'm unsure what it does if the encoding isn't an ascii superset (or
> even if that can actually happen.)

POSIX has the notion of a "portable character set", which includes
the ASCII letters, digits, forward slash, and a few others. It requires
this set to be supported on any POSIX implementation.

So the file system encoding should always be an ASCII superset, in
the repertoire superset sense. I don't think POSIX assigns specific
code points, so it doesn't have to be a superset in the coded character
set sense.

I'm sure those VMS users will tell us some day.

Regards,
Martin


More information about the Python-3000 mailing list