[英]Python Unicode string stored as '\u84b8\u6c7d\u5730' in file, how to convert it back to Unicode?
Some Unicode data is stored in file as '\蒸\汽\地' without any encoding.一些 Unicode 数据以 '\蒸\汽\地' 的形式存储在文件中,没有任何编码。
Is there a way to covert them back in Python?有没有办法将它们转换回 Python 中?
>>> print '\u84b8\u6c7d\u5730'.decode('unicode-escape')
蒸汽地
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.