Strange problems with encoding

Rudy Schockaert rudy.schockaert at pandoraSTOPSPAM.be
Thu Nov 6 10:00:44 EST 2003


Joe Fromm wrote:

> 
> Try adding
> 
> sys.setdefaultencoding( 'latin-1' )
> 
> to your site.py module, or rewrite your fragment as
> 
At the end of site.py you can enable a piece of code that sets your 
default encoding to the current locale of your computer:

if 1:
     # Enable to support locale aware default string encodings.
     import locale
     loc = locale.getdefaultlocale()
     if loc[1]:
         encoding = loc[1]

This works great for me.

Thanks for pointing me to site.py

P.S. I really need some weeks off so I can read all the available 
documentation ;-)




More information about the Python-list mailing list