Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

chardet gets it right, but may be confused by others

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.



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: