Message196836
On Python 3 you should not only open file in text mode with specified encoding, but also specify the "xmlcharrefreplace" error handler.
doc.writexml(open(filename, "w", encoding="utf-8", errors="xmlcharrefreplace"), "", " ", "utf-8")
I can suggest only one solution -- explicitly document this behavior.
Perhaps we also should add a special module level function for writing DOM tree to binary file. Low-level writexml() should not be used directly. |
|
Date |
User |
Action |
Args |
2013-09-03 10:24:14 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, scoder, eli.bendersky, brianvanderburg2 |
2013-09-03 10:24:14 | serhiy.storchaka | set | messageid: <1378203854.9.0.509881025674.issue18911@psf.upfronthosting.co.za> |
2013-09-03 10:24:14 | serhiy.storchaka | link | issue18911 messages |
2013-09-03 10:24:14 | serhiy.storchaka | create | |
|