Convert a text file's encoding

From ArchWiki
Revision as of 22:24, 10 September 2011 by Emiralle (Talk | contribs) (This little reminder could use some friends: merge with Core Utilities)

Jump to: navigation, search

Tango-document-new.pngThis article is a stub.Tango-document-new.png

Notes: please use the first argument of the template to provide more detailed indications. (Discuss in Talk:Convert a text file's encoding#)

Merge-arrows-2.pngThis article or section is a candidate for merging with Core Utilities.Merge-arrows-2.png

Notes: please use the second argument of the template to provide more detailed indications. (Discuss in Talk:Convert a text file's encoding#)
Template:Box Note

Characters' encoding problems are well-known and of course there is a simple solution on linux to change a file's encoding.

This solution is named: iconv which is provided by the glibc package which is in core.

The following command will convert the foo file from ISO-8859-15 to UTF-8 saving it to foo.utf:

$ iconv -f ISO-8859-15 -t UTF-8 foo > foo.utf

The manual page of this program is pretty clear so refer to it for more advanced usage.