This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author flox
Recipients flox, mark.dickinson, michael.foord, ned.deily, ronaldoussoren, vstinner
Date 2010-05-13.23:42:19
SpamBayes Score 0.002020057
Marked as misclassified No
Message-id <1273794142.77.0.837128870246.issue8423@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2010-05-13 23:42:23floxsetrecipients: + flox, ronaldoussoren, mark.dickinson, vstinner, ned.deily, michael.foord
2010-05-13 23:42:22floxsetmessageid: <1273794142.77.0.837128870246.issue8423@psf.upfronthosting.co.za>
2010-05-13 23:42:20floxlinkissue8423 messages
2010-05-13 23:42:19floxcreate