The iconv command converts the characters or sequences of characters in a file from one codeset to another. The command then writes the results to standard output. The Traditional Chinese Solaris software includes special filters for the iconv command.
If no conversion exists for a particular character, the character is converted to the underscore “_” in the target codeset. The following options are supported:
-f from-code — Symbol of the input codeset
-t to-code — Symbol of the output codeset
The following table lists the codeset conversion modules that are supported in Traditional Chinese Solaris software.
Table 5–1 Codeset Conversion Modules
Source Code |
Symbol |
Target Code |
Symbol |
---|---|---|---|
CNS 11643 |
zh_TW-euc |
BIG5 |
zh_TW-big5 |
CNS 11643 |
zh_TW-euc |
ISO 2022-7 |
zh_TW-iso2022-7 |
BIG5 |
zh_TW-big5 |
CNS 11643 |
zh_TW-euc |
BIG5 |
zh_TW-big5 |
ISO 2022-7 |
zh_TW-iso2022-7 |
ISO 2022-7 |
zh_TW-iso2022-7 |
CNS 11643 |
zh_TW-euc |
ISO 2022-7 |
zh_TW-iso2022-7 |
BIG5 |
zh_TW-big5 |
CNS 11643 |
zh_TW-euc |
ISO 2022-CN-EXT |
zh_TW-iso2022-CN-EXT |
ISO 2022-CN-EXT |
zh_TW-iso2022-CN-EXT |
CNS 11643 |
zh_TW-euc |
BIG5 |
zh_TW-big5 |
ISO 2022-CN |
zh_TW-iso2022-CN-EXT |
ISO 2022-CN |
zh_TW-iso2022-CN |
BIG5 |
zh_TW-big5 |
UTF-8 |
UTF-8 |
CNS 11643 |
zh_TW-euc |
CNS 11643 |
zh_TW-euc |
UTF-8 |
UTF-8 |
UTF-8 |
UTF-8 |
BIG5 |
zh_TW-big5 |
BIG5 |
zh_TW-big5 |
UTF-8 |
UTF-8 |
UTF-8 |
UTF-8 |
ISO 2022-7 |
zh_TW-iso2022-7 |
ISO 2022-7 |
zh_TW-iso2022-7 |
UTF-8 |
UTF-8 |
IBM Cp937 |
zh_TW-cp937 |
UTF-8 |
UTF-8 |
UTF-8 |
UTF-8 |
IBM Cp937 |
zh_TW-cp937 |
BIG5+ |
zh_TW-big5p |
UTF-8 |
UTF-8 |
BIG5+HKSCS |
zh_TW-big5hk |
UTF8 |
UTF8 |
CNS 11643 |
zh_TW-euc |
UTF8 |
UTF8 |
UTF-8 |
UTF-8 |
BIG5+ |
zh_TW-big5p |
UTF-8 |
UTF-8 |
BIG5+HKSCS |
zh_HK-big5hk |
BIG5HK |
zh_HK-big5hk |
UTF-8 |
UTF-8 |
In the following example, an EUC mail file is converted to BIG5:
system% iconv -f zh_TW-euc -t zh_TW-big5 mail.euc > mail.big5 |
For further information, see the iconv(3C) and the iconv_TW(5) man pages. These utilities can be used for converting files for printing.