mirror of
https://github.com/micropython/micropython.git
synced 2026-01-16 08:57:18 +01:00
10 lines
320 B
Python
10 lines
320 B
Python
# Test a UTF-8 encoded literal
|
|
s = "asdf©qwer"
|
|
for i in range(len(s)):
|
|
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])))
|