2ec38a17d4
This will allow roughly the same behavior as Python3 for non-ASCII strings, for example, print("<phrase in non-Latin script>".split()) will print list of words, not weird hex dump (like Python2 behaves). (Of course, that it will print list of words, if there're "words" in that phrase at all, separated by ASCII-compatible whitespace; that surely won't apply to every human language in existence).
5 lines
182 B
Python
5 lines
182 B
Python
# anything above 0xa0 is printed as Unicode by CPython
|
|
# the abobe is CPython implementation detail, stick to ASCII
|
|
for c in range(0x80):
|
|
print("0x%02x: %s" % (c, repr(chr(c))))
|