PYTHON 文件格式检查

>>>import chardet

>>>chardet.detect(“e:\\a.txt”)

{‘encoding’: ‘gb2312’, confidence:0.99}

原文地址:https://www.cnblogs.com/Mingxx/p/2001695.html