]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-58124: Avoid CP_UTF8 in UnicodeDecodeError (GH-137415) (#137460)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 7 Oct 2025 17:39:31 +0000 (19:39 +0200)
committerGitHub <noreply@github.com>
Tue, 7 Oct 2025 17:39:31 +0000 (19:39 +0200)
commit57c8e3eb8ef399415a55d218a892efb36c275b43
tree131725611c9d98b9625ba515f22966f6fc857658
parente4e8c5a3b0f51fd403ee7deaa9187010a52f44e8
[3.14] gh-58124: Avoid CP_UTF8 in UnicodeDecodeError (GH-137415) (#137460)

gh-58124: Avoid CP_UTF8 in UnicodeDecodeError (GH-137415)

Fix name of the Python encoding in Unicode errors of the code page
codec: use "cp65000" and "cp65001" instead of "CP_UTF7" and "CP_UTF8"
which are not valid Python code names.
(cherry picked from commit ce1b747ff68754635b7b12870dfc527184ee3b39)

Co-authored-by: Victor Stinner <vstinner@python.org>
Lib/test/test_codecs.py
Misc/NEWS.d/next/Core_and_Builtins/2025-08-05-17-22-24.gh-issue-58124.q1__53.rst [new file with mode: 0644]
Objects/unicodeobject.c
Python/codecs.c