I have a directory containing files, some of them are UTF-8, some are CP-1251. I want to convert the ones that are CP-1251 to be UTF-8, but without corrupting the UTF-8 files.
I tried using iconv -f cp1251 -t utf8 <...>
, it works for CP-1251, but if the file is already UTF-8, it is also converted and becomes incomprehensible.