Ezio Melotti added the comment:

> On Python 3 you should not only open file in text mode with specified
> encoding, but also specify the "xmlcharrefreplace" error handler.

Isn't this only required in case there are non encodable characters?
If the encoding is utf-8, this shouldn't be necessary (unless there are lone 
surrogates).  Specifying xmlcharrefreplace might be useful while using ascii or 
latin1 though.

The docs of writexml don't seem to specify if the file should be opened in text 
or binary mode but istm that only text mode is supported.  The advice of using 
xmlcharrefreplace could be added in a note.

----------
nosy: +ezio.melotti
versions:  -Python 3.4

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18911>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to