首页 > 编程语言 > 详细

python头疼的编码问题

时间:2016-10-15 02:19:07      阅读:212      评论:0      收藏:0      [点我收藏+]
escape_string 序列 转中文输出
escape_string=\u559c\u6b22\u4e00\u4e2a\u4eba
print escape_string.decode(raw_unicode_escape)

str 转 utf8编码 unicode:
str_string.decode(utf8)

unicode 转  utf8编码 str:
unicode_string.encode(utf8)

 

python头疼的编码问题

原文:http://www.cnblogs.com/zsl-3/p/pyhton.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!