The charsetdetect package

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.