Changing file character sets

One of the big problems I usually find when I export or import information into/from databases in text file is the character set used in the result file created by the operation. To solve this, we have a in our Unix or Unix based system a great command line tool, iconv.

If you do not know the use of this tool, it is very simple and easy to use. And, trust on me, It can save your live.

The available and useful options are:

  • f: the encoding of the input.
  • t: the encoding of the output.

The use will be:

iconv -f UTF-8 -t ISO-8859-15 in.txt > out.txt

A tool as simple as useful.

See you.

Advertisements
Changing file character sets

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