mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #15378: Fix Tools/unicode/comparecodecs.py. Patch by Serhiy Storchaka.
This commit is contained in:
commit
e9631e5d3a
2 changed files with 3 additions and 1 deletions
|
@ -30,7 +30,7 @@ def compare_codecs(encoding1, encoding2):
|
|||
mismatch += 1
|
||||
# Check decoding
|
||||
for i in range(256):
|
||||
c = chr(i)
|
||||
c = bytes([i])
|
||||
try:
|
||||
u1 = c.decode(encoding1)
|
||||
except UnicodeError:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue