[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

Florent Xicluna report at bugs.python.org
Mon Mar 22 09:54:01 CET 2010


Florent Xicluna <florent.xicluna at gmail.com> added the comment:

http://codereview.appspot.com/664043 (patch against 3.x)

IIUC, the changes proposed (for 3.2) are:
 - default encoding or bool(encoding) == False
   ==> fallback to 'US-ASCII' encoding (instead of Unicode)
 - encoding=str or encoding='unicode'
   ==> serialize to Unicode

And it changes the behavior of :
 - ET.write()
 - tostring()
 - tostringlist()

For 2.x we could add the options for Unicode output:
 - encoding=unicode
 - and encoding='unicode'

----------
assignee: georg.brandl -> effbot
stage: test needed -> patch review

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


More information about the Python-bugs-list mailing list