解决python读取文件编码问题 code python Created At : 2022-02-02 00:00 Count:27 Views 👀 : import chardet# 获取文件编码def get_file_encode(file_path): with open(file_path, 'rb') as f: return chardet.detect(f.read())['encoding']