4 ms·
chardet gets it right, but may be confused by others http://chardet.readthedocs.org/en/latest/usage.html http://chardet.readthedocs.org/en/latest/usage.html i
by jgalt212 11y ago
chardet gets it right, but may be confused by others
http://chardet.readthedocs.org/en/latest/usage.html http://chardet.readthedocs.org/en/latest/usage.html
import chardet
print chardet.detect('Bush hid the facts')
>>> {'confidence': 1.0, 'encoding': 'ascii'}
It might be fun to run Hypothesis on this to see what if any minimal ASCII set is guessed wrong by chardet.