rust-chardet
rust-chardet copied to clipboard
Report ASCII even when escape sequences are present
This fixes a bug where detecting the charset of ASCII files that include
escape sequences run into unreachable!
.
Based on uchardet's implementation:
https://github.com/BYVoid/uchardet/blob/e6be22803691b60a275176fcf7d89315e1c76d8d/src/nsUniversalDetector.cpp#L247-L252