[issue18347] ElementTree corrupts cAse of closing tags when html method is specified

2013-07-02 Thread Adam Urban
New submission from Adam Urban: import xml.etree.ElementTree as ET tree = ET.parse(myinput.xml) tree.write(myoutput.xml, encoding=utf-16le, xml_declaration=False, default_namespace=None, method=html) If the source XML has a tag like this: someTagsomeData/someTag ElementTree will output

[issue18105] ElementTree writes invalid files when UTF-16 encoding is specified

2013-05-31 Thread Adam Urban
New submission from Adam Urban: import xml.etree.ElementTree as ET tree = ET.parse(myinput.xml) tree.write(myoutput.xml, encoding=utf-16) ...Output is a garbled mess, often a mix of UTF-8 and UTF-16 bytes... UTF-8 output works fine, but when UTF-16, UTF-16LE, or UTF-16BE are specified