[Python-Dev] logging module broken because of locale
"Martin v. Löwis"
martin at v.loewis.de
Tue Jul 18 23:15:17 CEST 2006
M.-A. Lemburg wrote:
> Right. In fact, some case mappings are not available in the Unicode
> database, since that only contains mappings which don't increase or
> decrease the length of the Unicode string. A typical example is the
> German u'ß'. u'ß'.upper() would have to give u'SS', but instead
> returns u'ß'.
Actually, that is in the Unicode database (SpecialCasing.txt):
00DF; 00DF; 0053 0073; 0053 0053; # LATIN SMALL LETTER SHARP S
> However, the point I wanted to make was that these mappings don't depend
> on the locale setting of the C lib - you have to explicitly
> access the mapping in the context of a locale and/or text.
I don't get that point. SpecialCasing.txt is clearly intended to take
locale context into account. Whether this is the "C locale", or some
other locale mechanism, is out of scope of the Unicode specification.
It could be the C locale (and indeed, the C locale implementations
often take the Unicode casing procedure into account these days).
Regards,
Martin
More information about the Python-Dev
mailing list