0

Is there any tools which can convert any strings to UTF-8 encoded values in Linux? Or any website is also OK.

1
  • 1
    Do you really mean UTF-8 encoded? You can do that with recode, you must know the original encoding, though, e.g. for Latin-1 (ISO-8859-1) you do recode l1..u8. Apr 26, 2013 at 13:38

2 Answers 2

2

You should try iconv:

cat yourfile | iconv -f latin -t utf-8 > yourfileINUTF8

You only need to know from what encode you are converting.

To discover the original encode of your file you can do.

file -i yourfile

And look for "charset="

1

This is basically Onilton Maciel answer, except that it finds original encoding itself.

iconv -f $(file -b --mime-encoding yourfile) -t utf-8 < yourfile > youroutput

You must log in to answer this question.

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