Issue #15378: Fix Tools/unicode/comparecodecs.py.  Patch by Serhiy Storchaka.
diff --git a/Misc/NEWS b/Misc/NEWS
index e1356ad..0efbefa 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -666,6 +666,8 @@
 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.
 
diff --git a/Tools/unicode/comparecodecs.py b/Tools/unicode/comparecodecs.py
index 0f5c1e2..01303db 100644
--- a/Tools/unicode/comparecodecs.py
+++ b/Tools/unicode/comparecodecs.py
@@ -30,7 +30,7 @@
             mismatch += 1
     # Check decoding
     for i in range(256):
-        c = chr(i)
+        c = bytes([i])
         try:
             u1 = c.decode(encoding1)
         except UnicodeError: