]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-91810: ElementTree: Use text file's encoding by default in XML declaration (GH...
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 11 May 2022 06:31:07 +0000 (09:31 +0300)
committerGitHub <noreply@github.com>
Wed, 11 May 2022 06:31:07 +0000 (09:31 +0300)
commit707839b0fe02ba2c891a40f40e7a869d84c2c9c5
tree862f7d27088ea23ecaa6da2a53b028b388ea1d9f
parent75e463430efcb5b20efa93f9a5d98ccd03d83a3d
gh-91810: ElementTree: Use text file's encoding by default in XML declaration (GH-91903)

ElementTree method write() and function tostring() now use the text file's
encoding ("UTF-8" if not available) instead of locale encoding in XML
declaration when encoding="unicode" is specified.
Lib/test/test_xml_etree.py
Lib/xml/etree/ElementTree.py
Misc/NEWS.d/next/Library/2022-04-25-10-23-01.gh-issue-91810.DOHa6B.rst [new file with mode: 0644]