[Python-Dev] Bytes path support

Antoine Pitrou antoine at python.org
Thu Aug 21 15:20:27 CEST 2014


Le 21/08/2014 00:52, Cameron Simpson a écrit :
>
> The "bytes in some arbitrary encoding where at least the slash character
> (and
> maybe a couple others) is ascii compatible" notion is completely bogus.
> There's only one special byte, the slash (code 47). There's no OS-level
> need that it or anything else be ASCII compatible.

Of course there is. Try to split an UTF-16-encoded file path on the byte 
47 and you'll get a lot of garbage. So, yes, POSIX implicitly mandates 
an ASCII-compatible encoding for file paths.

Regards

Antoine.




More information about the Python-Dev mailing list