>>> a = '\xe5\xbb\x8a\xe5\x9d\x8a\xe4\xb8\xad\xe5\xbf\x83\xe8\xbe\xb9\xe7\xbc\x98'.decode('utf-8').encode('utf-8')
>>> print a
廊坊中心边缘
>>> a = '\xe5\xbb\x8a\xe5\x9d\x8a\xe4\xb8\xad\xe5\xbf\x83\xe8\xbe\xb9\xe7\xbc\x98'.decode('utf-8').encode('utf-8')
>>> print a
廊坊中心边缘
本文标题:python十六进制字符码转中文
本文链接:https://www.haomeiwen.com/subject/acxycqtx.html
网友评论