Reputation: 2219
I need to convert a file to 8-bit(Cyrillic/8859-5), so I'm doing
iconv --from-code=UTF-8 --to-code=ISO-8859-5 file.UTF8 -o file.ISO
It works and finally when I check the encoding I get
file -bi file.ISO
text/plain; charset=iso-8859-1
Why ISO-8859-1?
Upvotes: 1
Views: 1418
Reputation: 2293
The command file
only makes guesses at a files encoding. It probably would be hard to determine ISO 8859-5 over ISO 8859-1 without looking the words up in a dictionary database because they are both similar 8 bit formats.
As long as you know the file is really ISO 8859-5, that's what matters.
Note: I have just learnt that (confusingly) ISO 8859-9 is aparently informally referred to as "Latin-5", so I have removed references to that confusing name.
Upvotes: 2