enca
Detect and convert the encoding of text files. tldr-pages
On several platforms
Several platforms
Detect file(s) encoding according to the system's locale
enca path/to/file1 path/to/file2 ...IdentifyDetect file(s) encoding specifying a language in the POSIX/C locale format (e.g. zh_CN, en_US)
enca --language language path/to/file1 path/to/file2 ...IdentifyConvert file(s) to a specific encoding
enca --language language --convert-to to_encoding path/to/file1 path/to/file2 ...IdentifyCreate a copy of an existing file using a different encoding
enca <original_file --language language --convert-to to_encoding >new_fileIdentify