1. 程式人生 > >UnicodeDecodeError: 'gbk' codec can't decode byte 0xbc in position 21: illegal multibyte sequence

UnicodeDecodeError: 'gbk' codec can't decode byte 0xbc in position 21: illegal multibyte sequence

png .cn src seq posit codec odi decode gbk

技術分享

Save the txt with UTF format and then open the file with f1 = open(path, encoding = ‘utf‘)

UnicodeDecodeError: 'gbk' codec can't decode byte 0xbc in position 21: illegal multibyte sequence