[Python-checkins] r68335 - peps/trunk/pep0/pep.py
"Martin v. Löwis"
martin at v.loewis.de
Mon Jan 5 10:55:49 CET 2009
> FWIW, I think you could use the unicodedata module here to normalize
> the names, so all kind of accented characters
> can be replaced in the future:
>
> import unicodedata
>
> def _normalize(name):
> return unicode(unicodedata.normalize('NFKD', name).encode('ASCII',
> 'ignore'))
Well, collation is a bottomless pit. To start with: how should you
collate non-English letters in an English document? Whether or not
ö collates like o depends on the language - in German, it does
(mostly, sometimes like oe); in Swedish (IIUC), it comes after the
rest of the alphabet. I think the objective is to sort me before
Tony Lownds - which is nice, but I wouldn't complain if it was
otherwise (and also to sort Walter Dörwald before Fred Drake)
Wrt. your approach: fortunately, Atsuo Ishimoto, Jiwon Seo, Oren Tirosh,
Moshe Zadka, Huaiyu Zhu (and a few other I probably didn't recognize)
don't insist on having their names correctly spelled. Otherwise,
this normalization would give an empty string for them.
Regards,
Martin
More information about the Python-checkins
mailing list