iconv - charset conversion utility
iconv -f from_charset -t to_charset
utility converts the characters or sequences of characters in
(s) (or inputstring
if specified with the -s
from one charset to another and writes the results to standard output. Should
no conversion exist for a particular character then it is converted to the
underscore '_' in the target charset.
The list of supported conversions and the locations of the associated conversion
tables are provided in the iconv
(3) manual page.
The following options are supported:
- -f from_charset
- Identifies the input charset.
- -t to_charset
- Identifies the output charset.
- -s inputstring
- Identifies the character sequence, which is to be converted instead of
The following operands are supported:
- A list of the input files to be translated. '-' means the standard
input. If file is omitted, the standard input is used.
The following example converts the contents of file mail1
and stores the results in file
example% iconv -f iso-8859-5 -t utf-8 mail1 > mail.local
(3) for the description of the ICONV_PATH
variable that affects the behaviour of iconv
The following exit values are returned:
- Successful completion.
- An error has occurred.