![]() |
![]() |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Appendix ABinary Compatibility PackageApplications compiled under Chinese OpenWindows 2.x or Solaris 1.x or SunOS 4.x systems have different binary formats than the current Chinese Solaris release. Older applications can nevertheless be run under the current Chinese release without being recompiled by using its included binary compatibility package (BCP). Note - SUNWowbcp must be included in your system configuration in order for you to run the following commands. See your system administrator for installation. The following BCP command runs the compiled binary code of earlier SunOS4.x /Solaris 1.x /Chinese OpenWindows 2.x applications without recompilation, although OpenWindows V2 Chinese applications display no input server status region. As shown in the following examples, the command calls the application by its old name (old_application_name) and sets the basic locale, input language, and display language using the older version's specific locale name (oldlocale):
The following example shows the command for running the compiled binary code of an earlier version of the textedit application on a current Traditional Chinese Solaris release system:
Due to incompatibilities between Traditional Chinese Solaris 2.x and 1.x applications, you cannot cut and paste Chinese characters between them. Traditional Chinese Test UtilitiesEvery utility listed in this section is supported, but for this version of Solaris, you are encouraged to use the XPG4 internationalization APIs as described in the International Language Environments Guide. The utilities in the following table test various aspects of the Traditional Chinese (CNS 11643) national standard character set. They also assume that the character being tested is part of the national standard character set. The arguments for the functions in the following table must be a character in WC, wchar_t. For more information, see the hctype(3x) man page. Table A-1
Asian-Specific UtilitiesThis section describes functions for wide character and string input and output, character classification, and conversion functions for the Korean or Chinese character sets. Asian Solaris software implements a wide character library for handling Korean or Chinese character codes according to industry standards. Routines that have Korean or Chinese language-specific dependency are in their own language-specific library, which is linked with the corresponding C compiler option. In Traditional Chinese Solaris, libhle is linked with -lhle. Refer to the appropriate man page for more information. Asian Solaris software defines WC as a constant-width, four-byte code. WC uses the ANSI C data type wchar_t, which Solaris software defines in wchar.h as follows:
In Solaris software, long is four bytes. Conversion UtilitiesThe conversion utilities described in this section are available, but you should use iconv as a standard function. Asian Solaris software provides facilities for various conversions, for example:
Programs using the general multibyte conversion utilities should include the header files widec.h and wctype.h. Traditional Chinese Solaris specific routines (such as ishxxx) are declared in zh_TW/xctype.h. Programs using the general multibyte conversion utilities should include three header files: wctype.h, widec.h, and zh_TW/xctype.h. As with classification functions described in the previous section, the use of these utilities can be controlled by the setlocale function. Locale-specific routines are contained in a locale-specific library. For Traditional Chinese, that library is libhle. The library can be linked during compilation using the C compiler option -lhle. Conversion Within a CodesetThe multibyte conversion functions are similar to the one-byte conversion functions toupper() and tolower(). These functions convert wide-characters to other wide characters. For more information on conversion routines, see the man pages for wconv(3)for all locales and hconv(3) for Traditional Chinese. The following routines are in the regular Chinese C library: Table A-2
Conversion for Traditional Chinese Character CodesThe following routines perform character-based code conversion on the CNS-11643 character set. They convert characters in the set between CNS-11643, EUC, and Big5 formats. To use these routines, the library hle must be linked using the C compiler option -lhle. For more information, see the hconv(3x) man page. Table A-3
Table A-4
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||