enca

Detect and convert the encoding of text files. More information: https://github.com/nijel/enca.

enca path/to/file1 path/to/file2 ...

enca -L language path/to/file1 path/to/file2 ...

enca -L language -x to_encoding path/to/file1 path/to/file2 ...

enca -L language -x to_encoding < original_file > new_file