This chapter describes the applications and code conversion utilities that you use in the Traditional Chinese operating system. The chapter discusses the following topics:
The encoding variable in .mailrc does not affect Mailer behavior, but it does set mailx function. To send email in formats other than 7-bit ASCII, such as 8-bit Traditional Chinese characters, you must use /usr/SUNWale/bin/mailx. The encoding variable in .mailrc sets encoding formats for mailx.
International transmission conventions require header information to contain only ASCII characters. Traditional Chinese characters should not be used in the header (including the Subject line) with Mailer or with mailx.
The /bin/mailx application has not been localized and cannot send or receive Traditional Chinese characters.
To use Traditional Chinese characters with talk, the /usr/SUNWale/bin/talk application is required because /bin/talk is not localized.
Traditional Chinese Solaris software provides the following BDF font generator:
xtobdf – Converts an X server font to a BDF font.
The runb5 utility permits terminal-based BIG5 applications to run under the Solaris TTY window environment.
The sdtconvtool graphic user interface utility enables file conversion between various codesets. The sdtconvtool functionality is similar to iconv.
The following procedure describes how to convert a file. In this example, a file encoded in UTF-8 is converted to BIG5 encoding.
In the source codeset field of the stdconvtool panel, select the codeset of the file to be converted.
Scroll through the pull-down list and select the codeset of the file to be converted. In this example, select UTF-8.
In the source file path field, type the path in the path of the file to be converted.
Alternatively, you can click the Browse button and select the name of the file to be converted. In this example, type or select the /tmp/en_US.UTF-8 file.
You can use the Clear button to the right of the Browse button to remove a path you enter.
In the target codeset field, select the codeset to which the file will be converted.
In this example, select BIG5.
In the target path field, type the path for the converted file.
In this example, type or select /tmp/BIG5.all.txt.
Press the start conversion button to begin the conversion process.
The Clear All Fields button erases both the source file and target file path names.
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.