En Sun, 28 Sep 2008 07:01:12 -0300, Olivier Lauzanne <[EMAIL PROTECTED]> escribió:
On Sep 28, 11:21 am, est <[EMAIL PROTECTED]> wrote:

Can anyone tell me how to customize a default encoding, let's say
'ansi' which handles range(256) ?

I assume you are using python2.5
Edit the file /usr/lib/python2.5/site.py

There is a method called
def setencoding():
    [...]
    encoding = "ascii"
    [...]

Change "encoding = "ascii" to encoding = "utf-8"

On windows you may have to use "mbsc" or something like that. I have
no idea what windows use at its encoding.

*Not* a good idea at all.
You're just masking errors, and making your programs incompatible with all other Pythons installed around the world.

--
Gabriel Genellina

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

Reply via email to