The iconv utility converts the characters or sequences of characters in file from one code set to another and writes the results to standard output. If no conversion exists for a particular character, it is converted to the underscore _ in the target code set.
The list of supported conversions and the locations of the associated conversion tables are provided in the iconv(5) manual page.
The following options are supported:
Identifies the input code set.
Identifies the output code set.
The following operands are supported:
A path name of the input file to be translated. If file is omitted, the standard input is used.
The following example converts the contents of file mail1 from code set 8859 to 646fr and stores the results in file mail.local:
example% iconv -f 8859 -t 646fr mail1 > mail.local
See environ(5) for descriptions of the following environment variables that affect the execution of iconv: LANG, LC_ALL, LC_CTYPE, LC_MESSAGES, and NLSPATH.
list of conversions supported by conversion tables
conversion binary tables
See attributes(5) for descriptions of the following attributes:
|ATTRIBUTE TYPE||ATTRIBUTE VALUE|
The iconv utility can use conversion modules (/usr/lib/iconv/*.so), conversion tables (/usr/lib/iconv/*.t), or conversion binary tables (/usr/lib/iconv/geniconvtbl/binarytables/*.bt) to do the code set conversion. The iconv utility uses iconv_open(3C) to see if a particular code set conversion is available in the iconv(3C) function. iconv_open(3C) first tries to find out if there is a conversion binary table and then if there is a conversion module. If neither is available in your system, iconv_open(3C) will return a failure code. Then, finally, iconv will search for a conversion table.
Refer to the /usr/share/man/man5/iconv_locale.5 manual page in the Asian localized releases for information on which code set conversions are supported. For example, the command
example% man -s 5 iconv_ja
would display the manual page describing the code set conversions that are supported for the Japanese locale.
Notice that the iconv_locale(5) manual page may not exist in your system, depending on which locale you chose to install during the system installation.