我知道python中的unicode字符串,就像u“blablabla”。它应该以“u”字开头。 但是我从一些api中找到了一些类似unicode的字符串
{"ret":"100015","msg":"\u5bc6\u7801\u8f93\u5165\u9519\u8bef\uff0c\u8fd8\u53ef\u4ee5\u8f93\u51654\u6b21","msg_new":"\u5bc6\u7801\u8f93\u5165\u9519\u8bef<br>\u8fd8\u53ef\u4ee5\u8f93\u5165<b>4<\/b>\u6b21"}
字符串不是以“u”字符开头的,所以我想知道如何处理这些字符串?在
对于给定的
str
(在python3中,bytes
)的字符以\uHHHH
形式编码(unicode字符转义序列),可以使用unicode-escape
编解码器对其进行解码。在相关问题 更多 >
编程相关推荐