libguess is a high speed, open source character set encoding detector. libguess employs discrete-finite automata to deduce the character set of the input buffer. The advantage of this is that all character sets can be checked in parallel, and quickly.Extracted automatically from Libguess homepage
brew install libguess
This formula has no dependencies.