对于抓取的网页处理时,我们往往要判断它的字符编码,今天发现了python的一个自动判断编码的lib,特与众分享.
名称:chardet
介绍:Character encoding auto-detection in Python 2 and 3. As smart as your browser. Open source.
下载地址:
http://pypi.python.org/pypi/chardet/1.0.1
文档地址:
http://chardet.feedparser.org/docs/index.html
文档目录: