Changing the default text codec

Fuzzyman michael at foord.net
Mon Feb 23 10:25:56 EST 2004


Peter Otten <__peter__ at web.de> wrote in message news:<c1chv0$85i$07$1 at news.t-online.com>...
> Fuzzyman wrote:
> 
[snip..]
> > I can't work out how to change the default codec (no matter what the
> > locale) ?
> > 
> > Anyone able to help - or point me to a useful resource ?? (I've tried
> > google - b4 u suggest it )
> 
> You can either explicitly convert your unicode strings:
> 
> unicodeword.encode("latin-1")
> 

I'll try this.
Some of the errors said (something to the effect of) 'character not in
range(128)' which sounds like some standard 'methods' (or functions)
are only prepared to deal with the default 7-bit ascii. That could be
a bugger.

> or try to modify your site.py from the default
> 
> encoding = "ascii"
> 
> to 
> 
> encoding = "latin-1"
> 

Short of me actually looking... where is site.py :-)


Thanks


Fuzzyman


http://www.voidspace.org.uk/atlantibots/pythonutils.html

> Peter



More information about the Python-list mailing list