Python 读取文件时报错:UnicodeDecodeError: 'gbk' codec can't decode byte 0x99 in position 1008: illegal multibyte sequence

python读取文件时报错: "UnicodeDecodeError: 'gbk' codec can't decode byte 0x99 in position 1008: illegal multibyte sequence"

办法1.
  open('order.log','r', encoding='UTF-8')

办法2.
  open('order.log','rb')

 

posted @ 2020-03-16 10:42  Danniel_gong  阅读(554)  评论(0编辑  收藏  举报