]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #15378: Fix Tools/unicode/comparecodecs.py. Patch by Serhiy Storchaka.
authorAntoine Pitrou <solipsis@pitrou.net>
Wed, 17 Oct 2012 14:12:30 +0000 (16:12 +0200)
committerAntoine Pitrou <solipsis@pitrou.net>
Wed, 17 Oct 2012 14:12:30 +0000 (16:12 +0200)
Misc/NEWS
Tools/unicode/comparecodecs.py

index e1356add4720f418b52c6c1d191e3ff9e2280405..0efbefae70a0ea4229ffec18c3eb46fd72576aee 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -666,6 +666,8 @@ Documentation
 Tools/Demos
 -----------
 
+- Issue #15378: Fix Tools/unicode/comparecodecs.py.  Patch by Serhiy Storchaka.
+
 - Issue #14695: Fix missing support for starred assignments in
   Tools/parser/unparse.py.
 
index 0f5c1e24a3a26345a48b0ad0622201936539919a..01303dbcb74bf9c1ea3d0f55de1a0ff7371a47e2 100644 (file)
@@ -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: