Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)

iconv(1) OSS Shell and Utilities Reference Manual
NAME
iconv - Converts encoded characters to another code set
SYNOPSIS
iconv
-f from_code
-t to_code
[le ...]
FLAGS
-f from_code
Species the input code set
-t to_code
Species the output code set
Operands
file species the le to be converted
DESCRIPTION
The iconv command converts the encoding of characters in le from one coded character set to
another and writes the results to the standard output le.
The input and output coded character sets are identied by the arguments from_code and
to_code. If the le operand is not specied on the the command line, the iconv command reads
the standard input le.
If you specify invalid characters in the input stream, iconv returns an error message, writes the
already converted data to standard output, and exits with a status greater than 0 (zero.)
If you specify characters in the input stream that are valid members of the input code set but are
invalid members of the output code set, the input value is translated into a substitute character.
Such conversions are called non-identical conversions. The value of the substitute character
depends on the output code set specied.
The default value is 0x1A (the ASCII character SUB); the default value is 0xFFFD (the UCS-2
REPLACEMENT CHARACTER) for conversions to the UCS-2 code set. If the conversion is
done by using a table, the substitute character may be specied by a target_sub directive in the
source translation table. The default is 0x1A if there is no target_sub directive.
If a non-identical conversion occurred while converting an input le, the iconv utility will
attempt to print a warning message to the standard error le, once per le. If an input le is large
it is possible that the non-identical conversion warning will not be printed, even if such conver-
sions occurred. The exit status is not affected by a non-identical conversion.
If the LOCPATH environment variable is not dened or is set to the empty string (""), iconv
looks for converters and conversion tables in the default path: /usr/lib/nls/loc:/etc/nls/loc.
Otherwise, iconv looks in the directories specied by LOCPATH. If no valid converters or
conversion tables are found in the directories specied by LOCPATH, the default path is
searched too. If the superuser is using iconv, LOCPATH is ignored. $LOCPATH is an environ-
ment variable which, if set, species directories containing the iconv and iconvTable subdirec-
tories to be used instead of the default directories. The value of $LOCPATH must be a colon-
separated list of directories in which iconv can nd the subdirectories containing converters and
conversion tables. Specied directories must have the same organization as the /usr/lib/nls/loc
directory.
conversion_directory/iconv/*
is a directory containing algorithmic converters, where conversion_directory is
444 Hewlett-Packard Company 527188-003