Converting encoding of a file

Conversion of file encoding can be done easily and in a scriptable fashion using iconv (man page):

iconv -f latin1 -t utf-8 rapport.tex.old >> rapport.tex

The example above converts the file rapport.tex.old from latin1 (ISO-8859-1) to UTF-8. The result is stored in rapport.tex leaving the old file untouched.

Advertisements

Tags: , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: