Expand the Unicode tests
This commit is contained in:
parent
7bc91904f8
commit
01bd686846
@ -1,3 +1,9 @@
|
||||
# Test a UTF-8 encoded literal
|
||||
s = "asdf©qwer"
|
||||
for i in range(len(s)):
|
||||
print("s[%d]: %s"%(i, s[i]))
|
||||
print("s[%d]: %s %X"%(i, s[i], ord(s[i])))
|
||||
# Test all three forms of Unicode escape, and
|
||||
# all blocks of UTF-8 byte patterns
|
||||
s = "a\xA9\xFF\u0123\u0800\uFFEE\U0001F44C"
|
||||
for i in range(len(s)):
|
||||
print("s[%d]: %s %X"%(i, s[i], ord(s[i])))
|
||||
|
Loading…
Reference in New Issue
Block a user