-
Notifications
You must be signed in to change notification settings - Fork 291
CP949 detected, but when decode: illegal multibyte sequence #170
Description
Using chardet 4.0.0 I put the following ISO-8859-1 sequence of bytes through detect_all:
OTE up to \xa350K first year!. to emergency situations \xb7 perform all activities with children, i.e. jump, dance, walk, run, etc. for extended periods of time \xb7 must possess acceptable hearing... . oh. to emergency situations \xb7 perform all activities with children, i.e. jump, dance, walk, run, etc. for extended periods of time \xb7 both indoor and outdoor... . ok. for the public including lectures, concerts, recitals, dramatic productions, dance performances, films, and art exhibits. laurens county's renowned quality of... . sc.
The result was:
[{'encoding': 'CP949', 'confidence': 0.99}, {'encoding': 'ISO-8859-1', 'confidence': 0.73}, {'encoding': 'ISO-8859-9', 'confidence': 0.5047156139708759}]
When trying to decode it using CP949, I got a Unicode error:
UnicodeDecodeError: 'cp949' codec can't decode byte 0xa3 in position 10: illegal multibyte sequence
CP949 shouldn't have been predicted at all.