iconv(1)

NAME
iconv - charset conversion utility

SYNOPSIS
iconv -f from_charset -t to_charset [ -s inputstring | file... ]

DESCRIPTION
The iconv utility converts the characters or sequences of characters in file(s) (or inputstring if specified with the -s option) 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.

OPTIONS
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 input files.

OPERANDS
The following operands are supported:

file(s)
    A list of the input files to be translated. '-' means the standard input. If file is omitted, the standard input is used.

EXAMPLES
The following example converts the contents of file mail1 from charset iso-8859-5 to utf-8 and stores the results in file mail.local.

    example% iconv -f iso-8859-5 -t utf-8 mail1 > mail.local

ENVIRONMENT
See iconv(3) for the description of the ICONV_PATH environment variable that affects the behaviour of iconv.

EXIT STATUS
The following exit values are returned:

0   Successful completion.

1   An error has occurred.

SEE ALSO
iconv(3)