Traditional Chinese Solaris User's Guide

Chapter 5 Localized Applications

This chapter describes selected properties you need to use on two localized applications of the Traditional Chinese Solaris operating environment. This chapter also provides lists of code conversion utilities.

These tools (and the commands to invoke them) include:

Using the mailx Utility With Traditional Chinese Characters

The encoding variable in .mailrc does not affect Mailer behavior, but it does set mailx function. To send e-mail 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 that header information use only ASCII characters. So Traditional Chinese characters should not be used in the header (including the Subject line) with Mailer or with mailx.


Note -

The /bin/mailx application has not been localized and cannot send or receive Traditional Chinese characters.


Using talk With Traditional Chinese Characters

To use Traditional Chinese characters with talk, the /usr/SUNWale/bin/talk application is required because /bin/talk is not localized.

The xtobdf Utility

Traditional Chinese Solaris software provides this BDF font generator:

xtobdf -- Converts font in X server to font in BDF.

The runb5 Utility

Traditional Chinese Solaris software provides a utility that permits terminal-based Big5 applications to run under Sun's TTY window environment:

runb5 - Runs Big5 applications under Sun's TTY window environment.

Sdtconvtool

Sdtconvtool is a graphic user interface utility that enables file conversion between various codesets. Its functionality is similar to iconv.

The following steps show how to convert a file encoded in UTF-8 to BIG5 encoding:

  1. Select the code set of the file to be converted.

    Click on the arrow button to the right of the "Source Code Set" label to reveal a list of available code sets in the system. Scroll through the list and select the code set of the file to be converted. In this case, select "UTF-8."

  2. Type the path of the file to be converted.

    The path to the file can either be entered manually in the "Source File Path" area, or chosen by selecting the "Browse..." button and selecting the file name from the file selection box. In this case, enter or select /tmp/en_US.UTF-8.

    The "Clear" button to the right of the "Browse..." button can be used to erase the entered source or path.

  3. Select the code set to which the file will be converted.

    Select the target file code set information from the pulldown menu to the right of the "Target Code Set:" label, as in Step 1. In this case, select "BIG5."

  4. Type the path for the converted file.

    Enter the path to the file can in the "Target File Path" area. In this case, enter or select /tmp/BIG5.all.txt.

    The "Clear" button to the right of the "Browse..." button can be used to erase the entered source or path.

  5. Press the "Start Conversion" button.

    The "Start Conversion" button will begin the conversion process using the given information. The "Clear All Fields" button will erase both the source and target file path names.

iconv

The iconv command converts the characters or sequences of characters in a file from one code set to another and writes the results to standard output. Traditional Chinese Solaris software includes special filters for the iconv command.

If no conversion exists for a particular character, it is converted to the underscore "_" in the target codeset. The following options are supported:

-f from code

Symbol of the input code set.

-t to code

Symbol of the output code set.

The following code set conversion modules are supported in Traditional Chinese Solaris software.

Table 5-1

Source Code 

Symbol 

Target Code 

Symbol 

CNS 11643 

zh_TW-euc 

Big-5 

zh_TW-big5 

CNS 11643 

zh_TW-euc 

ISO 2022-7 

zh_TW-iso2022-7 

Big-5 

zh_TW-big5 

CNS 11643 

zh_TW-euc 

Big-5 

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 

Big-5 

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 

Big-5 

zh_TW-big5 

ISO 2022-CN 

zh_TW-iso2022-CN 

ISO 2022-CN 

zh_TW-iso2022-CN 

Big-5 

zh_TW-big5 

UTF-8 

UTF-8 

CNS 11643 

zh_TW-euc 

CNS 11643 

CNS 11643 

UTF-8 

UTF-8 

UTF-8 

UTF-8 

Big-5 

zh_TW-big5 

Big-5 

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 

Big-5+ 

zh_TW-big5p 

UTF-8 

UTF-8 

UTF-8 

UTF-8 

Big-5+ 

zh_TW-big5p 

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(3) and iconv_zh_TW(5) man pages. These utilities can be used for converting files for printing. See Traditional Chinese Solaris System Administrator's Guide for more information.