Python读取CSV文件,报错:UnicodeDecodeError: 'gbk' codec can't decode byte 0xa7 in position 727: illegal multibyte sequence
解决办法:
在语句open(sFileName,newline='')中,增加encoding='UTF-8',如下:
open(sFileName,newline='',encoding='UTF-8')
2023-12-22 22:51:57
Python读取CSV文件,报错:UnicodeDecodeError: 'gbk' codec can't decode byte 0xa7 in position 727: illegal multibyte sequence
解决办法:
在语句open(sFileName,newline='')中,增加encoding='UTF-8',如下:
open(sFileName,newline='',encoding='UTF-8')