[issue14587] Certain diacritical marks can and should be capitalized... e.g. ü --> Ü

Martin v. Löwis report at bugs.python.org
Sun Apr 15 17:50:56 CEST 2012


Martin v. Löwis <martin at v.loewis.de> added the comment:

In addition to R. David's remark, it also works fine in a German locale. In general, you cannot know whether the byte '\xe4' denotes 'ä' or some other letter. For example, in KOI8-R, it denotes Д, instead, which already is an upper-case letter. So either do setlocale at the start of your program, or (better) switch to Unicode strings.

Python 2.6.6 (r266:84292, Dec 27 2010, 00:02:40)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> print u'ä'.upper()
Ä

----------
nosy: +loewis

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14587>
_______________________________________


More information about the Python-bugs-list mailing list