Message105669
The gory details...
>>> import os, unicodedata
>>> tempdir = u'temp_pep277'
>>> name = u'\u0385\u03d3\u03d4'
>>> os.mkdir(tempdir)
>>> with open(os.path.join(tempdir, name), 'w') as f:
... f.write('foo')
>>> unicodedata.normalize('NFD', name)
u'\xa8\u0301\u03d2\u0301\u03d2\u0308'
>>> os.listdir(tempdir)
[u'\xa8\u0301\u03d2\u03d2\u0301\u0308']
The filename should use the Normal Decomposition (NFD) of the original filename. But the decomposition looks wrong on this platform.
The problem is similar for the other special filenames. Examples:
- u'\u0385\u03d3\u03d4'
==> NFD: u'\xa8\u0301\u03d2\u0301\u03d2\u0308'
==> OSX: u'\xa8\u0301\u03d2\u03d2\u0301\u0308'
- u' \u0308\u0301\u038e\u03ab'
==> NFD: u' \u0308\u0301\u03a5\u0301\u03a5\u0308'
==> OSX: u' \u0308\u0301\u03a5\u03a5\u0301\u0308'
- u'\u1e9b\u1fc1\u1fcd\u1fce\u1fcf\u1fdd\u1fde\u1fdf\u1fed'
==> NFD: u'\u017f\u0307\xa8\u0342\u1fbf\u0300\u1fbf\u0301\u1fbf\u0342\u1ffe\u0300\u1ffe\u0301\u1ffe\u0342\xa8\u0300'
==> OSX: u'\u017f\u0307\xa8\u0342\u1fbf\u0300\u1fbf\u0301\u1fbf\u1ffe\u1ffe\u1ffe\xa8\u0342\u0300\u0301\u0342\u0300'
I have no idea how to investigate further.
And the "PPC Tiger" buildbot does not fail here.
Reference about OSX decomposition:
http://developer.apple.com/mac/library/qa/qa2001/qa1173.html |
|
Date |
User |
Action |
Args |
2010-05-13 23:42:23 | flox | set | recipients:
+ flox, ronaldoussoren, mark.dickinson, vstinner, ned.deily, michael.foord |
2010-05-13 23:42:22 | flox | set | messageid: <1273794142.77.0.837128870246.issue8423@psf.upfronthosting.co.za> |
2010-05-13 23:42:20 | flox | link | issue8423 messages |
2010-05-13 23:42:19 | flox | create | |
|