Uppercase/Lowercase on unicode
Kless
jonas.esp at googlemail.com
Fri Jun 5 06:09:49 EDT 2009
On 5 jun, 09:59, "Gabriel Genellina" <gagsl-... at yahoo.com.ar> wrote:
> En Fri, 05 Jun 2009 06:39:31 -0300, Kless <jonas.... at 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
I just to check it in the python shell and it's correct.
Then the problem is by iPython that I was testing it from there.
More information about the Python-list
mailing list