在蟒:的Unicode UTF-8/UTF-16编码在Python
u'\u3053\n'
它是UTF-16?
我真的不知道所有的Unicode /编码的东西,但这种类型的东西出现在我的数据集, ,如果我有a=u'\u3053\n'
。
print
给出例外,并且 解码给出例外。
a.encode("utf-16") > '\xff\xfeS0\n\x00'
a.encode("utf-8") > '\xe3\x81\x93\n'
print a.encode("utf-8") > πüô
print a.encode("utf-16") > ■S0
这是怎么回事?
http://www.fileformat.info/info/unicode/char/3053/index.htm – 8steve8 2009-08-04 19:32:02