python -i
Steffen Ries
steffen.ries at sympatico.ca
Tue Oct 9 07:38:07 EDT 2001
epchaves at yahoo.com.br writes:
> Hi:
>
> My script are:
>
> __________________
> import string
>
> a = string.lower("ÇÇÇÀÀÀAAA")
> print a
>
> ____________________
>
> if i do: python -i myfile.py
> the output is OK: çççàààaaa
>
> but if i do: python myfile.py
> the output isn't the expected: ÇÇÇÀÀÀaaa
>
> Why?
You have to call 'locale.setlocale(locale.LC_ALL, "")' to make python
work with non-ascii encodings.
For some reason it would seem, that this happens automatically when
you start python interactively...
hth,
/steffen
--
steffen.ries at sympatico.ca <> Gravity is a myth -- the Earth sucks!
More information about the Python-list
mailing list