Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ iconv(1) — SunOS 5.5.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

iconv(3)

environ(5)

iconv(5)

iconv(1)

NAME

iconv − code set conversion utility

SYNOPSIS

iconv −f fromcode −t tocode [ file... ]

AVAILABILITY

SUNWcsu

DESCRIPTION

The iconv command converts the characters or sequences of characters in file from one code set to another and writes the results to standard output. Should no conversion exist for a particular character then it is converted to the underscore ’_’ in the target codeset. 

iconv will always convert to or from the ISO 8859-1 Latin alphabet No.1, from or to an ISO 646 ASCII variant codeset for a particular language.  The ISO 8859-1 codeset will support the majority of 8 bit codesets. The conversions attempted by iconv accommodate the most commonly used languages. 

The following table lists the supported conversions. 

Code Set Conversions Supported
Code Symbol Target Code Symbol comment
ISO 646 646 ISO 8859-1 8859 US ASCII
ISO 646de 646de ISO 8859-1 8859 German
ISO 646da 646da ISO 8859-1 8859 Danish
ISO 646en 646en ISO 8859-1 8859 English ASCII
ISO 646es 646es ISO 8859-1 8859 Spanish
ISO 646fr 646fr ISO 8859-1 8859 French
ISO 646it 646it ISO 8859-1 8859 Italian
ISO 646sv 646sv ISO 8859-1 8859 Swedish
ISO 8859-1 8859 ISO 646 646 7 bit ASCII
ISO 8859-1 8859 ISO 646de 646de German
ISO 8859-1 8859 ISO 646da 646da Danish
ISO 8859-1 8859 ISO 646en 646en English ASCII
ISO 8859-1 8859 ISO 646es 646es Spanish
ISO 8859-1 8859 ISO 646fr 646fr French
ISO 8859-1 8859 ISO 646it 646it Italian
ISO 8859-1 8859 ISO 646sv 646sv Swedish

The conversions are performed according to the tables found on iconv(5). 

OPTIONS

The following options are supported:

−f fromcode Identifies the input code set. 

−t tocode Identifies the output code set. 

OPERANDS

The following operands are supported:

file A path name of the input file to be translated.  If file is omitted, the standard input is used. 

EXAMPLES

The following 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

ENVIRONMENT

See environ(5) for descriptions of the following environment variables that affect the execution of iconv: LC_CTYPE, LC_MESSAGES, and NLSPATH. 

EXIT STATUS

The following exit values are returned:

0 upon successful completion

1 an error has occurred. 

FILES

/usr/lib/iconv/∗.so conversion modules

/usr/lib/iconv/∗.t conversion tables

/usr/lib/iconv/iconv_data
list of conversions supported by conversion tables

SEE ALSO

iconv(3), environ(5), iconv(5)

NOTES

iconv can use conversion modules (/usr/lib/iconv/∗.so) or conversion tables (/usr/lib/iconv/∗.t).  If a conversion module and a conversion table both exist for a particular codeset conversion, iconv uses the conversion module. 

Refer to the /usr/share/man/man5/iconv_locale.5 manual page in the Asian localized releases for information on which codeset conversions are supported.  For example, the command

% man −s 5 iconv_ja

would display the manual page describing the codeset conversions that are supported for the Japanese locale. 

Note that the iconv_locale.5 manual page may not exist in every localized release. Also, the iconv_locale.5 manual page does not exist in the U. S. (non-localized) release. 
 

SunOS 5.5.1  —  Last change: 28 Mar 1995

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026