Windson Yang <[email protected]> added the comment:
I added a PR for like this:
.. note::
You should specify the "xmlcharrefreplace" error handler when open a file
with
specified encoding::
writer = open(
filename, "w", encoding="utf-8",
errors="xmlcharrefreplace")
doc.writexml(writer, "", " ", "utf-8")
----------
nosy: +Windson Yang
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue18911>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com