]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-58124: Avoid CP_UTF8 in UnicodeDecodeError (GH-137415) (#137461)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 6 Aug 2025 12:59:11 +0000 (14:59 +0200)
committerGitHub <noreply@github.com>
Wed, 6 Aug 2025 12:59:11 +0000 (12:59 +0000)
commitf2d6931656ace7957ab3492901d93d40057ce24e
tree4b2d8b3770456588939049d264c7d21b1614ba53
parent9cfa4dfe05539479a6aa652ee7df0691f39b3cc7
[3.13] gh-58124: Avoid CP_UTF8 in UnicodeDecodeError (GH-137415) (#137461)

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