UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte error in python while reading a csv file
问题 StopWords = pd.read_csv('stopwords.csv',encoding='UTF-8', quotechar='|',names=['StopWords']) I am trying to read a CSV file that contains Persian language text, and this is the error I get: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte 回答1: Without seeing the binary content of the file it is difficult to guess the actual encoding but UTF-8, with or without a BOM (Byte order Marker) cannot start with an 0xFF. If it starts with an 0xFF, then that