[Python-Dev] Import and unicode: part two

Victor Stinner victor.stinner at haypocalc.com
Wed Jan 19 20:31:08 CET 2011


Le mercredi 19 janvier 2011 à 10:42 -0800, Brett Cannon a écrit :
> > I am not sure what exactly is not supported.  On my OSX system:
> 
> Victor said this is a Windows-specific issue.

Autoquote: "(a) (...) doesn't work with a locale encoding different than
UTF-8"

Hum, it's not exactly the locale encoding, but the Python filesystem
encoding. On Mac OS X, this encoding is *hardcoded* to UTF-8, so it is
possible to use non-ASCII module names on this OS. It is also possible
on other BSD/UNIX systems using UTF-8 locale encoding.

But this issue only concerns any BSD/UNIX using a locale encoding
different than UTF-8. Eg. MvL's buildbot (x86 debian parallel 3.x) uses
ISO-8859-15 (see #10492, issue fixed 13 days ago). Even if UTF-8 becomes
a de facto standard locale encoding, many systems still use something
else. And Python 2 users will complain that their script works with
Python 2 but not with Python 3 :-)

If we decide to reject non-ASCII module names, it should be done on any
operating systems, not only on Windows.

Victor



More information about the Python-Dev mailing list