Message11809

Author jeff.allen
Recipients Arfrever, jeff.allen, zyasoft
Date 2018-03-16.20:27:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1521232077.19.0.467229070634.issue2294@psf.upfronthosting.co.za>
In-reply-to
Content
In Jython 2.7.2a1, this now works:

PS iss2294> jython test.py
sys.path[-1]: '\xc4\x87\xc5\x9b\xc5\xba'
<module 'a' from '膰艣藕\a.py'>
sys.path[-1]: u'\u0107\u015b\u017a'
<module 'b' from '膰艣藕\b.py'>

Or nearly works, apart from the encoding of the directory name for console output. See also #2295.

Interestingly, CPython 2.7.14 fails on my Windows machine:

PS iss2294> python test.py
sys.path[-1]: '\xc4\x87\xc5\x9b\xc5\xba'
Traceback (most recent call last):
  File "test.py", line 8, in <module>
    import a
ImportError: No module named a

This is because the first path actually consists of utf-8 bytes (source encoding) while the FS-encoding is ms936.
History
Date User Action Args
2018-03-16 20:27:57jeff.allensetmessageid: <1521232077.19.0.467229070634.issue2294@psf.upfronthosting.co.za>
2018-03-16 20:27:57jeff.allensetrecipients: + jeff.allen, zyasoft, Arfrever
2018-03-16 20:27:57jeff.allenlinkissue2294 messages
2018-03-16 20:27:56jeff.allencreate