CharsetDetector: Improve CharsetDetector