This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author effbot
Recipients effbot, flox, georg.brandl, gvanrossum, r.david.murray, scoder
Date 2010-03-12.10:14:05
SpamBayes Score 0.0007112702
Marked as misclassified No
Message-id <>
"Yes, the feature has been implemented deep down in the _encode() helper function, so it impacts the entire serialiser, not only its API"


>>> import locale
>>> locale.getpreferredencoding() == "utf-8"
>>> from xml.etree.ElementTree import *
>>> e = Element("tag")
>>> e.text = "hellö"
>>> tostring(e)
>>> ElementTree(e).write("out.xml")
>>> tree = parse("out.xml")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python31\lib\xml\etree\", line 843, in parse
    tree.parse(source, parser)
  File "C:\Python31\lib\xml\etree\", line 581, in parse
  File "C:\Python31\lib\xml\etree\", line 1221, in feed
    self._parser.Parse(data, 0)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 1, column 9
Date User Action Args
2010-03-12 10:14:08effbotsetrecipients: + effbot, gvanrossum, georg.brandl, scoder, r.david.murray, flox
2010-03-12 10:14:08effbotsetmessageid: <>
2010-03-12 10:14:06effbotlinkissue8047 messages
2010-03-12 10:14:05effbotcreate