missing sys.setappdefaultencoding

Craig Ringer craig at postnewspapers.com.au
Fri Jan 7 11:11:34 EST 2005

On Fri, 2005-01-07 at 19:06, Alex Martelli wrote:
> Uwe Mayer <merkosh at hadiko.de> wrote:

> > well, I wrote a nice python program which won't work if the default encoding
> > has not been set from ascii to latin-1 or latin-15.
> Then your program is not very nice...;-)

Agreed. I prefer to use explicit str.encode(), str.decode() and
unicode() calls where appropriate.

On a side note, PEP 263 handles the text encoding interpretation of
Python program source, and is well worth reading and following.


Craig Ringer

More information about the Python-list mailing list