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

Stefan Behnel report at bugs.python.org
Fri May 31 06:58:06 EDT 2019


Stefan Behnel <stefan_ml at behnel.de> added the comment:

Asking users unconditionally to use the "xmlcharrefreplace" replacement method seems wrong for UTF-8. It should not be necessary.

We should, however, document explicitly that the file will receive text and not bytes, i.e. that users are themselves responsible for opening the output file with the desired encoding. We should also make it clearer that the "encoding" argument to writexml() does not change that.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue18911>
_______________________________________


More information about the docs mailing list