New submission from Serhiy Storchaka: >>> import xml.etree.ElementTree >>> data = '<?xml version="1.0" encoding="iso-8859-1"?>\n<money >>> value="$\xa3\u20ac\U0001017b">$\xa3\u20ac\U0001017b</money>' >>> xml.etree.ElementTree.tostring(xml.etree.ElementTree.fromstring(data), >>> 'unicode') '<money value="$£â\x82¬ð\x90\x85»">$£â\x82¬ð\x90\x85»</money>'
---------- components: XML messages: 180143 nosy: eli.bendersky, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: ElementTree incorrectly parses strings with declared encoding not UTF-8 type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16986> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com