iconv - Convert characters from one CCSID to another CCSID

Synopsis

iconv -f fromCCSID -t toCCSID [ file ... ]

Description

The iconv utility converts the encoding of characters read from either standard input or the specified file from one CCSID to another CCSID and then writes the results to standard output. The input data is assumed to be in the CCSID specified by the fromCCSID parameter. If file is not specified, the iconv utility reads from standard input.

You must specify the CCSID values defined on i5/OS with a supported conversion for the fromCCSID and toCCSID parameters.

Options

-f fromCCSID
The input data is encoded in the fromCCSID.
-t toCCSID
The output data is encoded in the toCCSID.

Operands

The file operand specifies a path name to a regular file.

Exit status

  • 0 when successful
  • 1 when the conversion is not supported or there is an error with file
  • 2 when there is an error during the conversion