chardet

Detect character encoding in text files automatically

brewmacoslinux
Try with needOr install directly
Source

About

Python character encoding detector

Commands

chardet

Examples

Detect encoding of a single file$ chardet myfile.txt
Detect encoding of multiple files$ chardet file1.txt file2.txt file3.txt
Detect encoding of all files in a directory$ chardet /path/to/directory/*