[issue11033] ElementTree.fromstring doesn't work with Unicode

2013-08-04 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue11033] ElementTree.fromstring doesn't work with Unicode

2013-08-04 Thread Brendan O'Connor
Brendan O'Connor added the comment: Sure, go ahead and close it. I was just trying to be helpful and report a bug in the Python standard library. I don't use Python 3.3 so cannot test it. -- nosy: +Brendan.OConnor ___ Python tracker

[issue11033] ElementTree.fromstring doesn't work with Unicode

2011-02-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Wed, Feb 2, 2011 at 11:10 AM, STINNER Victor wrote: .. > We can explain in ElementTree documentation how to pass non-ASCII unicode > strings: using > explicit encoding to UTF-8. ElementTree.fromstring() ultimately calls ElementTree.XMLParser.feed() w

[issue11033] ElementTree.fromstring doesn't work with Unicode

2011-02-02 Thread STINNER Victor
STINNER Victor added the comment: > Since 2.x is closed for new features, this has to be rejected. We can explain in ElementTree documentation how to pass non-ASCII unicode strings: using explicit encoding to UTF-8. -- nosy: +haypo status: pending -> open

[issue11033] ElementTree.fromstring doesn't work with Unicode

2011-02-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: This works in 3.x: Python 3.2rc2+ (py3k:88279:88280, Feb 1 2011, 00:01:52) .. >>> from xml.etree import ElementTree >>> ElementTree.fromstring('诗') In 2.x you need to encode unicode strings before passing them to ElementTree.fromstring(). For example

[issue11033] ElementTree.fromstring doesn't work with Unicode

2011-01-27 Thread Peter Cai
New submission from Peter Cai : xml.etree.ElementTree.fromstring doesn't work with Unicode string. See the code below: >>> from xml.etree import ElementTree >>> t = ElementTree.fromstring(u'诗') Traceback (most recent call last): File "", line 1, in File "D:\Python26\lib\xml\etree\ElementT