looking for Linux commandline tool for determining character encoding of a file
Posted on 2010-11-17
I need to change the character-encoding of a large number of files, to UTF-8. The problem is that they are not all the same encoding to start with. I want to make a script that runs through and determines the current encoding for each file, then run iconv on the file to change to UTF-8.
I tried enca -i fileName but got:
$ enca -i fileName
enca: Cannot determine (or understand) your language preferences.
Please use `-L language', or `-L none' if your language is not supported
(only a few multibyte encodings can be recognized then).
Run `enca --list languages' to get a list of supported languages