diff options
author | Georg Brandl <georg@python.org> | 2008-05-16 17:02:34 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-05-16 17:02:34 (GMT) |
commit | bf82e374ee737992235cbe944c9ddbd58236a892 (patch) | |
tree | f8c8dccaa76d58f9cb7d8cc0abb1355be75ee369 /Tools/unicode/comparecodecs.py | |
parent | acbca71ea775fc488bead0876d0cdbd48670dcbc (diff) | |
download | cpython-bf82e374ee737992235cbe944c9ddbd58236a892.zip cpython-bf82e374ee737992235cbe944c9ddbd58236a892.tar.gz cpython-bf82e374ee737992235cbe944c9ddbd58236a892.tar.bz2 |
More 2to3 fixes in the Tools directory. Fixes #2893.
Diffstat (limited to 'Tools/unicode/comparecodecs.py')
-rw-r--r-- | Tools/unicode/comparecodecs.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Tools/unicode/comparecodecs.py b/Tools/unicode/comparecodecs.py index c291be4..dade1ce 100644 --- a/Tools/unicode/comparecodecs.py +++ b/Tools/unicode/comparecodecs.py @@ -15,7 +15,7 @@ def compare_codecs(encoding1, encoding2): mismatch = 0 # Check encoding for i in range(sys.maxunicode): - u = unichr(i) + u = chr(i) try: c1 = u.encode(encoding1) except UnicodeError as reason: @@ -34,11 +34,11 @@ def compare_codecs(encoding1, encoding2): try: u1 = c.decode(encoding1) except UnicodeError: - u1 = u'<undefined>' + u1 = '<undefined>' try: u2 = c.decode(encoding2) except UnicodeError: - u2 = u'<undefined>' + u2 = '<undefined>' if u1 != u2: print(' * decoding mismatch for 0x%04X: %-14r != %r' % \ (i, u1, u2)) |