Skip to content

Commit 23e6d3b

Browse files
committed
Revert "Map escape sequence name to uppercase before calling into unicodedata"
This reverts commit a9f10b7.
1 parent e4cec77 commit 23e6d3b

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

Misc/NEWS.d/next/Core and Builtins/2023-07-26-00-03-00.gh-issue-80667.N7Dh8B.rst

Lines changed: 0 additions & 2 deletions
This file was deleted.

Objects/unicodeobject.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6011,18 +6011,9 @@ _PyUnicode_DecodeUnicodeEscapeInternal(const char *s,
60116011
if (namelen) {
60126012
/* found a name. look it up in the unicode database */
60136013
s++;
6014-
6015-
/* map to uppercase before calling getcode, which does
6016-
* case-sensitive comparisons */
6017-
char buffer[namelen];
6018-
size_t i;
6019-
for (i = 0; i < namelen; i++) {
6020-
buffer[i] = Py_TOUPPER(start[i]);
6021-
}
6022-
60236014
ch = 0xffffffff; /* in case 'getcode' messes up */
60246015
if (namelen <= INT_MAX &&
6025-
ucnhash_capi->getcode(buffer, (int)namelen,
6016+
ucnhash_capi->getcode(start, (int)namelen,
60266017
&ch, 0)) {
60276018
assert(ch <= MAX_UNICODE);
60286019
WRITE_CHAR(ch);

0 commit comments

Comments
 (0)