python查看文件的編碼格式

安裝: pip install chardet 代碼: import chardet filePath = r"C:\Users\Lenovo\Desktop\G0001.TextGrid" with open(filePath, "rb") as f: content = f.read() result = chardet.detect(content) print(r
相關文章
相關標籤/搜索