Mihail Radu Solcan

  Convert encoding with iconv

2007-12-21

When I migrated from Win98 to Fedora Core 3 I had to convert many of my former text documents. The documents created with Win98 were encoded in CP1250. On Fedora, UTF-8 is too good to be changed, so I converted the encoding of the documents. 

Let us say that I have a file named iconv-ro-cp1250.txt and I have to convert it to UTF-8. In the command line write the following line

iconv -f CP1250 -t UTF-8 iconv-ro-cp1250.txt > iconv-ro-utf8.txt

Press Enter and execute the command. 

You have now a file named iconv-ro-utf8.txt. 

Use

man iconv

to get know more about iconv. 

Use

iconv -l

to discover the list of the encodings.