[issue27940] xml.etree: Avoid XML declaration for the "ascii" encoding

Stefan Behnel report at bugs.python.org
Fri Sep 2 11:40:20 EDT 2016


Stefan Behnel added the comment:

> By the way, I'm surprised that the special encoding "unicode" relies on the *current* locale encoding when the XML declaration is requested.

That seems a weird choice. Since it serialises to a Unicode string, it shouldn't have any XML declaration at all, if only to make it easy for users to add one themselves if they feel like it.

I guess it's too late to change that now, though...

----------
nosy: +scoder

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27940>
_______________________________________


More information about the Python-bugs-list mailing list