python 把\u开头的unicode转中文

2019-04-10  本文已影响0人  云樱梦海

'''

coding=utf-8

import chardet

msg='\u8bbe\u7f6e\u6d41\u91cf\u5f15\u64ce\u76d1\u63a7\u7f51\u5361\u5931\u8d25'

msg=chardet.detect(msg)

print msg.encode('utf-8').decode('unicode_escape')
'''

上一篇 下一篇

猜你喜欢

热点阅读