[docs] [issue18911] minidom does not encode correctly when calling Document.writexml

Windson Yang report at bugs.python.org
Wed May 15 23:12:19 EDT 2019

Windson Yang <wiwindson at outlook.com> 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",
         doc.writexml(writer, "", "  ", "utf-8")

nosy: +Windson Yang

Python tracker <report at bugs.python.org>

More information about the docs mailing list