iconv(1) iconv(1)
NAME
iconv - international codeset conversion
SYNOPSIS
iconv -f fromcode -t tocode [--] [file ...]
DESCRIPTION
iconv reads input characters from a file or from standard input, con-
verts the encoding of these characters, and writes the results on the
standard output.
The conversions that can be performed with iconv are defined in
conversion tables located in the directory /usr/lib/iconv. Only the
available conversion tables can be used.
iconv is typically used to convert characters from the ISO 8859-1
character set to an ISO 646 ASCII variant codeset for a particular
language and vice versa (see EXAMPLES).
OPTIONS
-f fromcode
-t tocode
iconv expects the conversion table to be in the file
/usr/lib/iconv/fromcode.tocode.t. Any character that does not
exist in the target codeset is converted to an underscore "_".
-- If file begins with a dash (-), the end of the command-line
options must be marked with --.
file Name of the file for which codeset conversion is to be performed.
It is possible to specify several files, which are then processed
in one after the other.
file not specified: iconv reads from standard input.
ERROR MESSAGES
Not supported xx to yy
iconv does not support the requested conversion from codeset xx to
target codeset yy.
LOCALE
The LCMESSAGES environment variable governs the language in which
message texts are displayed. If LCMESSAGES is undefined or is defined
as the null string, it defaults to the value of LANG. If LANG is like-
wise undefined or null, the system acts as if it were not internation-
alized.
The LCALL environment variable governs the entire locale. LCALL
takes precedence over all the other environment variables which affect
internationalization.
Page 1 Reliant UNIX 5.44 Printed 11/98
iconv(1) iconv(1)
EXAMPLES
Example 1
List all conversion tables:
$ ls /usr/lib/iconv
646da.8859.t 646fr.8859.t 8859.646da.t 8859.646fr.t
646de.8859.t 646it.8859.t 8859.646de.t 8859.646it.t
646en.8859.t 646sv.8859.t 8859.646en.t 8859.646sv.t
646es.8859.t 8859.646.t 8859.646es.t iconvdata
Example 2
Convert the file named letter and save the result in a file named
letter.conv. The conversion is to be made from the German variant of
the ISO 646 codeset (ASCII derivative) to the target codeset ISO
8859-1:
$ iconv -f 646de -t 8859 letter > letter.conv
FILES
/usr/lib/iconv
Directory containing the standard conversion tables for codeset
conversion
/usr/lib/iconv/iconvdata
Auxiliary file for iconv
/usr/lib/iconv/*.t
Conversion tables
SEE ALSO
gencat(1), iconv(3C), iconv(5), iconvtab(5).
Page 2 Reliant UNIX 5.44 Printed 11/98