摘要: 首先,感叹一下Python2.x系列的编码问题,确实让人蛋疼! 在写UninstallTool工具时,需要对获取到的字符串进行编码判断,谷歌了一下,大侠们都推荐用chardet第三方模块来处理,于是导入到自己的代码中还以为一切ok,可是杯具产生了,提示:libs\chardet\universaldetector.py:90: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal,十分蛋疼,于是又谷歌了一下,其中有一篇文章说道解决这个问题方法:使用chardet之前,需要先用string.decode("utf-8")之类的先去解码,然后copy到代码中,运行一下还是提示同样的问 阅读全文
posted @ 2013-10-25 19:23 @烈风 阅读(611) 评论(0) 推荐(0) 编辑