convert Unicode to lower/uppercase?

jallan jallan at
Sun Sep 21 19:40:48 CEST 2003

Peter Otten <__peter__ at> wrote in message news:<bkepb9$6a4$01$1 at>...
> nospam wrote:
> > Has someone got a Python routine or module which converts Unicode
> > strings to lowercase (or uppercase)?
> Toiled and came up with:
> >>> print u"abcäöüß".upper()
> >>> u"ABCÄÖÜ".lower()
> u'abc\xe4\xf6\xfc'
> Peter

But that really doesn't work properly. According to Unicode specs and
German usage the uppercase of "ß" is actually "SS", that is the single
character "ß" should uppercase to two characters.

Jim Allan

More information about the Python-list mailing list