[issue9692] UnicodeDecodeError in ElementTree.tostring()

Ulrich Seidl report at bugs.python.org
Thu Aug 26 18:21:05 CEST 2010


Ulrich Seidl <Ulrich.Seidl at muneda.com> added the comment:

Of course, if you use an unicode string it works and of course it would be easy to switch to unicode for this demo code. Unfortunately, the affected application is a little bit more complex and it is not that easy to switch to unicode. I just wonder why the tostring() method does not assume that internal strings are encoded in the explicitly provided encoding? Is ElementTree restricted to the use of unicode strings? Anyway, why was it working (as expected) with python 2.5 & python 2.6?

----------

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


More information about the Python-bugs-list mailing list