Answers for "'utf-8' codec can't decode byte 0x80 in position 6: invalid start byte"

2

UnicodeDecodeError: 'utf-8' codec can't decode byte invalid start byte

# Use 'ISO-8859-1' instead of "utf-8" for decoding
text = open(fn, 'rb').read().decode('ISO-8859-1')
Posted by: Guest on September-23-2020
0

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa5 in position 10: invalid start byte

#use rb over r
with open(path, 'rb') as f:
  text = f.read()
Posted by: Guest on August-24-2020

Code answers related to "'utf-8' codec can't decode byte 0x80 in position 6: invalid start byte"

Python Answers by Framework

Browse Popular Code Answers by Language