[Python-Dev] str.ascii_lower

Martin v. Loewis martin at v.loewis.de
Mon Dec 29 12:24:57 EST 2003

Looking at python.org/sf/866982, I find it troubling that
there are languages where "I".lower() != "i"
(for those of you not familiar with Turkish: the lower-case
letter of "I" is U+0131, LATIN SMALL LETTER DOTLESS I,
which is \xfd in iso-8859-9).

As a solution, I'd like to propose a new method ascii_lower,
which is locale-unaware and only works for bytes 65..90
(returning the byte itself for all other characters).

Similarly, ascii_upper might be needed "for symmetry";
I don't know whether the symmetry should extend beyond
those two.

This, in turn, should be used inside the codecs library
where encoding names are normalized to lower case.

What do you think?


More information about the Python-Dev mailing list