set python default encoding

reetesh nigam nigamreetesh84 at gmail.com
Mon Apr 6 06:15:49 EDT 2009


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.

Thanks and Regards

Reetesh Nigam



More information about the Python-list mailing list