Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)

iconv(1) OSS Shell and Utilities Reference Manual
specied in $LOCPATH.
conversion_directory
/iconvTable/*
is a directory containing iconv conversion tables generated by genxlt, where
conversion_directory
is specied 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 le
iconv:read Failure to read an input le
iconv: write
Failure to write to the output le
The following error messages have an exit value of 2:
iconv: truncated character found
Uncompleted multibyte character in the input le
iconv: invalid character found
Invalid character in the input le
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 le.
EXAMPLES
To convert the contents of the le eucjp.file from code set eucJPC to SJIS, and store the
results in the le sjis.file,enter:
iconv -f eucJP -t SJIS eucjp.le > sjis.le
To convert the contents of the le latin1.file from code set ISO 8859-1 to code set ISO
8859-2 and store the results in the le latin2.le,enter:
iconv -f ISO8859-1 t-UCS-2 latin1.le | iconv -f UCS-2 -t ISO8859-2 >
latin2.le
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.
448 Hewlett-Packard Company 527188-007