gh-58124: Avoid CP_UTF8 in UnicodeDecodeError (#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.
This commit is contained in:
@@ -1204,7 +1204,7 @@ get_standard_encoding_impl(const char *encoding, int *bytelength)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (strcmp(encoding, "CP_UTF8") == 0) {
|
||||
else if (strcmp(encoding, "cp65001") == 0) {
|
||||
*bytelength = 3;
|
||||
return ENC_UTF8;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user