How to decode strings on a text files like this:


This analyzer (https://2cyr.com/decode/?lang=en) detected the source encoding as WINDOWS-1251 + displayed as ISO-8859-1, and successfully decodes to desired Виталий

My question is, how can I set up iconv to decode it properly? For iconv -f WINDOWS-1251 -t ISO-8859-1 filename, i get Aeoaeee

1 Answer 1


Considering your locale is based on UTF-8, this will work:

echo "Âèòàëèé" | iconv -t ISO-8859-1 | iconv -f CP1251

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .