Python/environment problem with char encoding/decoding

Gabriel Rossetti gabriel.rossetti at
Wed Feb 18 08:43:51 EST 2009

Hello everyone,

I originally posted this on the Twisted mailing list, but now it seams 
to be  a more general python/environment problem. If I run the attached 
example in Eclipse, it works, if I run it from a terminal, it doesn't, I 
get :

$ python
Traceback (most recent call last):
  File "", line 30, in <module>
    res = rawXmlToElement("<t>reçu</t>")
  File "", line 21, in __call__
  File "/usr/lib/python2.5/site-packages/twisted/words/xish/", 
line 538, in addRawXml
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 5: 
ordinal not in range(128)

Does anyone understand why it doesn't work outside of Eclipse? My OS is 
Linux (Ubuntu 8.04).

Thank you,
-------------- next part --------------
A non-text attachment was scrubbed...
Type: text/x-python
Size: 843 bytes
Desc: not available
URL: <>

More information about the Python-list mailing list