unicode filenames
Neil Hodgson
nhodgson at bigpond.net.au
Thu Feb 6 16:50:45 EST 2003
Andrew Dalke:
> What does 'os.listdir()' do for that directory? I assume it's the byte
> strings, which means I need to do the UTF-8 conversion myself, which
> means dealing with unicode filenames on non-MS Windows machines is still
> complicated for Python.
The byte strings:
['abc', 'ascii', 'Gr\xc3\xbc\xc3\x9f-Gott', 'unilin.py',
'\xce\x93\xce\xb5\xce\xb9\xce\xac-\xcf\x83\xce\xb1\xcf\x82',
'\xd0\x97\xd0\xb4\xd1\x80\xd0\xb0\xd0\xb2\xd1\x81\xd1\x82\xd0\xb2\xd1\x83\xd
0\xb9\xd1\x82\xd0\xb5', '\xe3\x81\xab\xe3\x81\xbd\xe3\x82\x93',
'\xd7\x94\xd7\xa9\xd7\xa7\xd7\xa6\xd7\xa5\xd7\xa1',
'\xe6\x9b\xa8\xe6\x9b\xa9\xe6\x9b\xab',
'\xe6\x9b\xa8\xd7\xa9\xe3\x82\x93\xd0\xb4\xce\x93\xc3\x9f']
>
> At the very least, it's more confusing than I prefer dealing with.
Yes, same here. I don't think Python is the right level to solve it.
Neil
More information about the Python-list
mailing list