
Juniversalchardet is an encoding detector library, which takes a sequence of byte in an unknown character encoding without any additional information, and attempts to determine the encoding of the text.
techniques used by universalchardet are described at http://www.mozilla.org/projects/intl/universalcharsetdetection.html