cpython
4e8bce4d - [3.14] gh-99064: Ignore the encoding declaration when parsing decoded text (GH-156734) (GH-156751)

Commit
1 day ago
[3.14] gh-99064: Ignore the encoding declaration when parsing decoded text (GH-156734) (GH-156751) ElementTree.parse() with a text file mis-decoded the text in the C implementation: _parse_whole() encoded it as UTF-8, but left expat to honor the encoding declared in the document. It now overrides the encoding, as XMLParser.feed() already does for str data. (cherry picked from commit c83013c92dfdc77b87a523b736b76d5abb8ede2a)
Parents
Loading