Richard Urwin <soron...@googlemail.com> added the comment: I can't produce an automated test, for want of time, but here is a demonstrator.
Grab the example XHTML from http://docs.python.org/library/xml.etree.elementtree.html#elementtree-objects or use some tiny ASCII-encoded xml file. Save it as "file.xml" in the same folder as bug-test.py attached here. Execute bug-test.xml file.xml is read and then written in UTF-16. The output file is then read and dumped to stdout as a byte-stream. 1. To be correct UTF-16, the output should start with 255 254, which should never occur in the rest of the file. 2. The rest of the output (including the first line) should alternate zeros with ASCII character codes. 3. The file output.xml should be loadable in a UTF16-capable text editor (eg jEdit), be recognised as UTF-16 and be identical in terms of content to file.xml ---------- nosy: +Richard.Urwin Added file: http://bugs.python.org/file18211/bug-test.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue1767933> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com