Open System Services Shell and Utilities Reference Manual (G06.27+, H06.04+)
User Commands (g - j) iconv(1)
specified in $LOCPATH.
conversion_directory
/iconvTable/*
is a directory containing iconv conversion tables generated by genxlt, where
conversion_directory
is specified in $LOCPATH.
Environment Variables
The following environment variables affect the execution of the iconv command: LANG,
LC_ALL, LC_MESSAGES, NLSPATH.
DIAGNOSTICS
The following error messages have an exit value of 1:
Usage: iconv -f <from> -t <to> [<infile>]
Invalid command line
iconv: Cannot open converter
Failure to open a converter
iconv: Unable to allocate enough memory
Memory allocation failure
iconv: Input file cannot be opened
Failure to open the input file
iconv:read Failure to read an input file
iconv: write
Failure to write to the output file
The following error messages have an exit value of 2:
iconv: truncated character found
Uncompleted multibyte character in the input file
iconv: invalid character found
Invalid character in the input file
EXIT VALUES
If successful, the iconv command exits with a value of 0 (zero). If unsuccessful, the iconv com-
mand exits with a value greater than zero and writes an error message to the standard error file.
EXAMPLES
To convert the contents of the file eucjp.file from code set eucJPC to SJIS, and store the
results in the file sjis.file,enter:
iconv -f eucJP -t SJIS eucjp.file > sjis.file
To convert the contents of the file latin1.file from code set ISO 8859-1 to code set ISO
8859-2 and store the results in the file latin2.file,enter:
iconv -f ISO8859-1 t-UCS-2 latin1.file | iconv -f UCS-2 -t ISO8859-2 >
latin2.file
This conversion uses an intermediate code set (UCS-2) because there are no conversion tables or
algorithmic converters available for converting directly from ISO 8859-1 to ISO 8859-2.
FILES
/usr/lib/nls/loc/iconv/*
Contains algorithmic converters.
527188-004 Hewlett-Packard Company 4−45