diff --git a/Misc/NEWS b/Misc/NEWS index 8efe3860fbb..161b802de3f 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -207,5 +207,7 @@ Documentation Tools/Demos ----------- +- Issue #15378: Fix Tools/unicode/comparecodecs.py. Patch by Serhiy Storchaka. + **(For information about older versions, consult the HISTORY file.)** diff --git a/Tools/unicode/comparecodecs.py b/Tools/unicode/comparecodecs.py index 7de14fdc27e..6525ddf3e1a 100644 --- a/Tools/unicode/comparecodecs.py +++ b/Tools/unicode/comparecodecs.py @@ -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: