This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Zim
Recipients Zim
Date 2018-12-06.18:08:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1544119722.12.0.788709270274.issue35428@psf.upfronthosting.co.za>
In-reply-to
Content
The documentation[0] for 3.x of xml.etree.ElementTree.tostring is quite clear:

> Use encoding="unicode" to generate a Unicode string.

See also the creation of the problem:
https://bugs.python.org/issue10942

This is a violation of W3 standards, referenced by the ElementTree documentation[1] claiming it must conform to these standards, which state:

...it is a fatal error for an entity including an encoding declaration to be presented to the XML processor in an encoding other than that named in the declaration....

Encoding for 'unicode' does not appear in the named declarations (https://www.iana.org/assignments/character-sets/character-sets.xhtml) referenced by the same documentation[1].

Handling of a fatal error, must, in part: 

Once a fatal error is detected, however, the processor MUST NOT continue normal processing (i.e., it MUST NOT continue to pass character data and information about the document's logical structure to the application in the normal way)

[0] https://docs.python.org/3.2/library/xml.etree.elementtree.html
[1] The encoding string included in XML output should conform to the appropriate standards. For example, “UTF-8” is valid, but “UTF8” is not. See http://www.w3.org/TR/2006/REC-xml11-20060816/#NT-EncodingDecl and http://www.iana.org/assignments/character-sets.
History
Date User Action Args
2018-12-06 18:08:42Zimsetrecipients: + Zim
2018-12-06 18:08:42Zimsetmessageid: <1544119722.12.0.788709270274.issue35428@psf.upfronthosting.co.za>
2018-12-06 18:08:42Zimlinkissue35428 messages
2018-12-06 18:08:41Zimcreate