mirror of
https://github.com/python/cpython.git
synced 2025-10-19 16:03:42 +00:00
[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 ce1b747ff6
)
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
9cfa4dfe05
commit
f2d6931656
4 changed files with 5 additions and 6 deletions
|
@ -1087,7 +1087,7 @@ get_standard_encoding(const char *encoding, int *bytelength)
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (strcmp(encoding, "CP_UTF8") == 0) {
|
||||
else if (strcmp(encoding, "cp65001") == 0) {
|
||||
*bytelength = 3;
|
||||
return ENC_UTF8;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue