Mark Summerfield <m...@qtrac.eu> added the comment:

Perhaps a useful compromise would be to add an "encoding" attribute that is set 
to the encoding of the XML file that's read in (and with a default of "ascii").

That way it would be possible to preserve the encoding, e.g.:

import xml.etree.ElementTree as etree
xml_tree = etree.ElementTree(in_filehandle)
# process the tree
xml_tree.write(out_filehandle, encoding=xml_tree.encoding)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9522>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to