输出编码报错
2019-02-17 本文已影响0人
minlover
file1= open('Banner.txt','r')
报错:UnicodeDecodeError: 'gbk' codec can't decode byte 0x97 in position 84: illegal multibyte sequence
解决:
file1= open('Banner.txt','r',encoding='UTF-8')
file1= open('Banner.txt','r')
报错:UnicodeDecodeError: 'gbk' codec can't decode byte 0x97 in position 84: illegal multibyte sequence
解决:
file1= open('Banner.txt','r',encoding='UTF-8')