There are many plain text files which were encoded in variant charsets.
I want to convert them all to UTF-8, but before running iconv, I need to know its original encoding. Most browsers have an
Auto Detect option in encodings, however, I can't check those text files one by one because there are too many.
Only having known the original encoding, I then can convert the texts by
iconv -f DETECTED_CHARSET -t utf-8.
Is there any utility to detect the encoding of plain text files? It DOES NOT have to be 100% perfect, I don't mind if there're 100 files misconverted in 1,000,000 files.