“反編碼”我自己起的名字,大概意思就是我得到一串字符,是unicode碼,如:‘\u53eb\u6211’,進行反編碼後得到其對應的漢字。
f='\u53eb\u6211'
print f
print(f.decode('unicode-escape'))
結果爲:
\u53eb\u6211
叫我
“反編碼”我自己起的名字,大概意思就是我得到一串字符,是unicode碼,如:‘\u53eb\u6211’,進行反編碼後得到其對應的漢字。
f='\u53eb\u6211'
print f
print(f.decode('unicode-escape'))
結果爲:
\u53eb\u6211
叫我