En Fri, 05 Jun 2009 06:39:31 -0300, Kless <jonas....@googlemail.com> escribió:

Is there any librery that works ok with unicode at converting to
uppercase or lowercase?

--------------
foo = u'áèïöúñ'

print(foo.upper())
áèïöúñ
--------------

Looks like Python thinks your terminal uses utf-8, but it actually uses another encoding (latin1?) Or, you saved the script as an utf-8 file but the encoding declaration says otherwise.

This works fine for me:

py> foo = u'áèïöúñ'
py> print foo
áèïöúñ
py> print foo.upper()
ÁÈÏÖÚÑ

--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to