带有unicode转义序列的文本到python中的unicode

时间:2010-10-23 14:22:05

标签: python unicode

  

可能重复:
  Conversion of strings like \\uXXXX in python

嗨,假设我有字符串

test
'\\u0259'

请注意转义的反斜杠。

如何将其转换为相应的unicode字符串?

1 个答案:

答案 0 :(得分:30)

>>> print 'test \\u0259'.decode('unicode-escape')
test ə
相关问题