Mozilla have developed a robust and efficient character set detection algorithm for use in their web browsers. The algorithm is able to detect all of the most frequently encountered character encodings totally automatically.
This library wraps up their library and exposes a very simple Haskell interface to it. The library is portable, and is confirmed to work on both Unix and Windows.
This library is a maintained fork of charsetdetect:
It compiles with recent version of bytestring.
It works correctly in presence of Template Haskell on GHC 7.6.
It builds on 64-bit Windows.