摘要: 编码相关内置方法: (1) str.encode(encoding='utf-8'):返回字符串编码,encoding指定编码方式。 >>> a = 'I love Python' >>> a.encode(encoding='utf-8') b'I love Python' >>> a.encod 阅读全文
posted @ 2019-03-22 16:22 xue_shan 阅读(353) 评论(0) 推荐(0)
摘要: 看了以下两篇博文的基础上,感觉自己明白了点。记录下。 http://www.cnblogs.com/yuanchenqi/articles/5938733.html http://www.cnblogs.com/yuanchenqi/articles/5956943.html python2的编解码 阅读全文
posted @ 2019-03-13 17:45 xue_shan 阅读(741) 评论(0) 推荐(0)