latin1 encoding as default?
Gerhard Häring
gh at ghaering.de
Sat May 24 13:18:17 EDT 2003
Helmut Jarausch wrote:
> HI,
>
> is there a means to configure Python such that I
> can enter string constants in latin1-encoding?
Yes.
> I've tried to set encoding='latin1' in site.py
> but it didn't accept characters like
> ä - I get unsupported characters in input.
First, use sitecustomize.py instead of hacking site.py for local changes
:-) Then, such an approach is not recommended, as your app will then
depend on local changes to run correctly.
> (This is cvs python 05/24)
>
> Thanks for a hint,
Use an encoding cookie, they're meant for exactly this purpose:
http://www.python.org/peps/pep-0263.html
-- Gerhard
More information about the Python-list
mailing list