Read Text File Returns Unicodedecodeerror: 'utf-8' Codec Can't Decode Byte 0x92 In Python
I'm reading a text file using Python3 even I have mentioned encoding but it retruns: UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 96: invalid start byte
Solution 1:
Your textfile probably isn't encoded in utf-8. You might want to try a different encoding, e.g. encoding='cp1252'
Solution 2:
According to Exceen's answer on a related question, that's a "smart quote" in the Win-1252 encoding.
Post a Comment for "Read Text File Returns Unicodedecodeerror: 'utf-8' Codec Can't Decode Byte 0x92 In Python"