enca

Detects and converts text encoding between different character sets

brewmacoslinux
Try with needOr install directly
Source

About

Charset analyzer and converter

Commands

enca

Examples

Detect the encoding of a file$ enca filename.txt
Convert file from detected encoding to UTF-8$ enca -x UTF-8 filename.txt
Convert from specific source encoding to UTF-8$ enca -f ISO-8859-1 -t UTF-8 filename.txt