set python default encoding

R. David Murray rdmurray at bitdance.com
Mon Apr 6 19:17:15 CEST 2009


reetesh nigam <nigamreetesh84 at gmail.com> wrote:
> Hi All,
> I am unable to set the python default encoding.
> i used the following proccess to set the python encoding
> 
> import sys
> reload(sys)
> sys.setdefaultencoding('latin-1')
> 
> but it is giving me the same error :
> 
>       args = ('utf8', "MEDICINE '\xc4 ", 10, 12, 'invalid data',
> <bound method Root.history of <radspeed.controllers.Root object at
> 0x036FFE90>>)
>       encoding = 'utf8'
>       end = 12
>       message = ''
>       object = "MEDICINE '\xc4 "
>       reason = 'invalid data'
>       start = 10
> 
> 
> Please tell me how to solve this problem.

That doesn't look anything like a python traceback.  I'm guessing
you are using some sort of web framework?  Perhaps you should
try asking in the forum for the framework.

--
R. David Murray         http://www.bitdance.com




More information about the Python-list mailing list