[issue9692] UnicodeDecodeError in ElementTree.tostring()

Amaury Forgeot d'Arc report at bugs.python.org
Thu Aug 26 17:18:02 CEST 2010


Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:

IMO the code is not correct: how does ElementTree know which encoding is used for the attribute value?  Even 2.5 prints a different content when the script is saved with a different encoding.

The line should look like:
    oDoc.set( "ATTR", u"ÄÖÜ" )
or use ascii-only characters.

----------
nosy: +amaury.forgeotdarc

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9692>
_______________________________________


More information about the Python-bugs-list mailing list