Message196836
| Author | serhiy.storchaka |
|---|---|
| Recipients | brianvanderburg2, eli.bendersky, scoder, serhiy.storchaka |
| Date | 2013-09-03.10:24:14 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1378203854.9.0.509881025674.issue18911@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
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. |
|
| History | |||
|---|---|---|---|
| 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 | |