Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 570c5b2

Browse files
Issue #16980: Fix processing of escaped non-ascii bytes in the
unicode-escape-decode decoder.
2 parents f584aba + 73e3880 commit 570c5b2

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ What's New in Python 3.4.0 Alpha 1?
1010
Core and Builtins
1111
-----------------
1212

13+
- Issue #16980: Fix processing of escaped non-ascii bytes in the
14+
unicode-escape-decode decoder.
15+
1316
- Issue #16975: Fix error handling bug in the escape-decode bytes decoder.
1417

1518
- Issue #14850: Now a charmap decoder treats U+FFFE as "undefined mapping"

Objects/unicodeobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5598,7 +5598,7 @@ PyUnicode_DecodeUnicodeEscape(const char *s,
55985598
}
55995599
else {
56005600
WRITECHAR('\\');
5601-
WRITECHAR(s[-1]);
5601+
WRITECHAR((unsigned char)s[-1]);
56025602
}
56035603
break;
56045604
}

0 commit comments

Comments
 (0)