PYTHON 文件格式检查 >>>import chardet >>>chardet.detect(“e:\\a.txt”) {‘encoding’: ‘gb2312’, confidence:0.99}