1. 思路 用二进制打开文件,用chardet模块探测编码 2. 实现 import chardet wiht open('filename','rb') as f: data=f.read() print(chardet.detect(data)) 赞微海报分享
近期评论