当前位置: 移动技术网 > IT编程>脚本编程>Python > Python3中编码问题

Python3中编码问题

2018年04月11日  | 移动技术网IT编程  | 我要评论

foobar2000歌词,山茶花的产地,中考成绩全科满分

html = r'{"code":404,"msg":"\u8be5\u8d44\u6e90\u4e0d\u5b58\u5728"}'

print(html)
# {"code":404,"msg":"\u8be5\u8d44\u6e90\u4e0d\u5b58\u5728"}

print(html.encode('utf-8').decode('unicode-escape'))
# {"code":404,"msg":"该资源不存在"}

 

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网