[Python-Dev] casefolding in pathlib (PEP 428)

Christian Heimes christian at python.org
Fri Apr 12 15:00:28 CEST 2013


Am 12.04.2013 14:43, schrieb Ronald Oussoren:
> At least for OSX the kernel will normalize names for you, at least for HFS+,
> and therefore two names that don't compare equal with '==' can refer to the
> same file (for example the NFKD and NFKC forms of Löwe). 
> 
> Isn't unicode fun :-)

Seriously, the OSX kernel normalizes unicode forms? It's a cool feature
and makes sense for the user's POV but ... WTF?

Perhaps we should use the platform's API for the job. Does OSX offer an
API function to create a case folded and canonical form of a path?
Windows has PathCchCanonicalizeEx().

Christian



More information about the Python-Dev mailing list