>>>import chardet >>>chardet.detect(“e:\\a.txt”) {‘encoding’: ‘gb2312’, confidence:0.99}
>>>import chardet
>>>chardet.detect(“e:\\a.txt”)
{‘encoding’: ‘gb2312’, confidence:0.99}