Problem with lower() for unicode strings in russian

Diez B. Roggisch deets at nospam.web.de
Sun Oct 5 17:15:12 EDT 2008


Alexey Moskvin schrieb:
> Hi!
> I have a set of strings (all letters are capitalized) at utf-8,
> russian language. I need to lower it, but
> my_string.lower(). Doesn't work.
> See sample script:
> # -*- coding: utf-8 -*-
> [skip]
> s1 = self.title
> s2 = self.title.lower()
> print s1 == s2
> 
> returns true.
> I have no problems with lower() for english letters:, or with
> something like this:
> u'russian_letters_here'.lower(), but I don't need constants, I need to
> modify variables, but there is no any changs, when I apply lower()
> function to mine strings.

Can you give a concrete example? I doubt that there is anything 
different between lowering a unicode object given as literal or acquired 
somewhere else. And because my russian skills equal my chinese - total 
of zero - I can't create a test myself :)



More information about the Python-list mailing list