对于ASCII范围之外的Unicode字符,通常会使用以下术语:
# 使用代码点表示字符 chinese_char = '\u4e2d' print(chinese_char) # 输出:中 # 使用UTF-8编码表示字符 chinese_byte = b'\xe4\xb8\xad' chinese_char = chinese_byte.decode('utf-8') print(chinese_char) # 输出:中
上一篇:ASCII动画闪烁的Python
下一篇:ASCIIFoldingFilter中静态“foldToAscii”方法的使用说明