摘要: FROM:http://www.jb51.net/article/16104.htm在Python中,可以对String调用decode和encode方法来实现转码。比如,若要将某个String对象s从gbk内码转换为UTF-8,可以如下操作s.decode('gbk').encode('utf-8′)可是,在实际开发中,我发现,这种办法经常会出现异常:UnicodeDecodeError: ‘gbk' codec can't decode bytes in position 30664-30665: illegal multibyte sequence 阅读全文
posted @ 2013-12-29 23:20 wmx3ng 阅读(888) 评论(0) 推荐(0) 编辑