Message5678
If directory listing is taken using str name, Jython 2.5.1 returns different str names than Python 2.6 on Ubuntu:
$ mkdir x
$ touch x/tyhjä
$ python -c "import os; print os.listdir('x')"
['tyhj\xc3\xa4']
$ jython -c "import os; print os.listdir('x')"
['tyhj\xe4']
Based on the results the underlying problem seems to be the same as in issue 1592. It can be argued that this is fine, but the behavior when os.listdir is used with Unicode name is definitely a bug:
$ python -c "import os; print os.listdir(u'x')"
[u'tyhj\xe4']
$ jython -c "import os; print os.listdir(u'x')"
['tyhj\xe4']
From the doc of os.listdir: """If path is a Unicode object, the result will be a list of Unicode objects. Undecodable filenames will still be returned as string objects.""" |
|
Date |
User |
Action |
Args |
2010-04-12 07:07:36 | pekka.klarck | set | recipients:
+ pekka.klarck |
2010-04-12 07:07:36 | pekka.klarck | set | messageid: <1271056056.55.0.0699845750629.issue1593@psf.upfronthosting.co.za> |
2010-04-12 07:07:36 | pekka.klarck | link | issue1593 messages |
2010-04-12 07:07:35 | pekka.klarck | create | |
|