读取文件报错:‘gbk’ codec can’t decode byte 0x9d in position 7674: illegal multibyte sequence
打开文件时加上,encoding=‘UTF-8’,亲测有效!!
with open(filename,encoding='UTF-8') as f:
读取文件报错:‘gbk’ codec can’t decode byte 0x9d in position 7674: illegal multibyte sequence
打开文件时加上,encoding=‘UTF-8’,亲测有效!!
with open(filename,encoding='UTF-8') as f: