Issue2294

classification
Title: Importation of modules from directories with non-ASCII characters fails
Type: Severity: normal
Components: Core Versions: Jython 2.7
Milestone:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Arfrever, zyasoft
Priority: Keywords:

Created on 2015-03-19.12:41:22 by Arfrever, last changed 2015-03-19.12:41:22 by Arfrever.

Messages
msg9676 (view) Author: Arfrever Frehtes Taifersar Arahesis (Arfrever) Date: 2015-03-19.12:41:22
$ mkdir /tmp/ćśź
$ touch /tmp/ćśź/{a,b}.py
$ cat test.py
# coding: utf-8
import sys
sys.path.append("/tmp/ćśź")
print("sys.path[-1]: %r" % sys.path[-1])
import a
print(a)
sys.path[-1] = u"/tmp/ćśź"
print("sys.path[-1]: %r" % sys.path[-1])
import b
print(b)
$ python2.7 test.py
sys.path[-1]: '/tmp/\xc4\x87\xc5\x9b\xc5\xba'
<module 'a' from '/tmp/ćśź/a.py'>
sys.path[-1]: u'/tmp/\u0107\u015b\u017a'
<module 'b' from '/tmp/ćśź/b.py'>
$ jython2.7 test.py
sys.path[-1]: '/tmp/\xc4\x87\xc5\x9b\xc5\xba'
Traceback (most recent call last):
  File "test.py", line 5, in <module>
    import a
ImportError: No module named a
History
Date User Action Args
2015-03-19 12:41:22Arfrevercreate