This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients docs@python, jh45, vstinner
Date 2011-02-17.11:29:39
SpamBayes Score 3.9270864e-11
Marked as misclassified No
Message-id <1297942186.17.0.881583604641.issue11230@psf.upfronthosting.co.za>
In-reply-to
Content
Short answer:

In Python 3.2, « import héhé » doesn't work on Windows, but you can have non-ASCII paths in sys.path.

Longer answer:

I fixed the import machinery to handle correctly non-ASCII characters in module *paths*. But the import machinery is unable to handle non-ASCII characters in module *names*: it fails if the filesystem encoding is not UTF-8 (eg. it fails on Windows). There is another exception: Python doesn't support (yet) non encodable module paths on Windows. On Windows, you can use any character in directory names, but Python 3.2 encodes paths to the filesystem encoding (ANSI code page) which is a smaller charset. In practical, this Windows specific limitation on module paths doesn't really matter.

I plan to fix all these issues in Python 3.3: see #3080.

--

> Could you please make it clear in documentation and web pages,
> that this feature is not working yet. 

What's New in Python 3.2 documentation has this sentence: "Python’s import mechanism can now load modules installed in directories with non-ASCII characters in the path name. This solved an aggravating problem with home directories for users with non-ASCII characters in their usernames." which is correct.

Which web page should updated/fixed?
History
Date User Action Args
2011-02-17 11:29:46vstinnersetrecipients: + vstinner, docs@python, jh45
2011-02-17 11:29:46vstinnersetmessageid: <1297942186.17.0.881583604641.issue11230@psf.upfronthosting.co.za>
2011-02-17 11:29:39vstinnerlinkissue11230 messages
2011-02-17 11:29:39vstinnercreate