摘要: >>> a = '中文'>>> chardet.detect(a){'confidence': 0.7525, 'encoding': 'utf-8'}>>> b = a.decode('utf-8')>>> bu'\u4e2d\u6587'>>> c = b.encode('gb2312')>>> c'\xd6\xd0\xce\xc4'>>> 阅读全文
posted @ 2013-08-29 17:28 马僧 阅读(254) 评论(0) 推荐(0) 编辑