Ronald Oussoren <ronaldousso...@mac.com> added the comment: For completeness sake: Apple's Cocoa APIs do not renormalize strings, that is: I've created a file named 'één' in the Terminal, then (using a python 3.2 build):
# Terminal input seems NFC: >>> len('één') 3 # Output from os.listdir isn't: >>> os.listdir('.') ['één'] >>> len(_[0]) 5 # Output from the Cocoa equivalant also isn't: >>> import Foundation >>> mgr = Foundation.NSFileManager.defaultManager() >>> mgr.directoryContentsAtPath_('.') ( "e\U0301e\U0301n" ) >>> len(_[0]) 5 BTW. fsdecode(fsencode(x)) cannot in general be a no-op, unicode normalizations can screw things up (with the now withdrawn proposal the expression wouldn't be a no-op for NFD strings). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10209> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com