[Return to Library]  [TOC]  [PREV]  SECT--  [NEXT]  [INDEX] [Help]

6    Using Internationalized Software

This chapter explains how setup tasks and software features vary among language environments other than English. The chapter is aimed at programmers who are familiar with Digital UNIX in an English-language environment and who need to work with other languages, particularly those that use multibyte characters, to run and test their applications.


[Return to Library]  [TOC]  [PREV]  SECT--  [NEXT]  [INDEX] [Help]

6.1    Working in a Multilanguage Environment: Introduction

To enable input and display in any language other than English, you must always set the locale in which your process runs. Depending on the language, you may need to perform additional tasks, for example, to:

This chapter discusses these topics as they apply to particular languages or groups of languages. The chapter also describes command and DECwindows environment features that English-language speakers do not normally use and that allow you to display, enter, print, and mail text in languages other than English. For information about using internationalization features of applications that run in the Common Desktop Environment (CDE), see the CDE Companion.

Language-specific user guides provide additional information about customization and use of software provided for a particular language. These user guides are on the CD-ROM titled "Digital UNIX Online Documentation." If one or more of the language variant subsets are installed on your system, you can use the following command to read language variant guides using Bookreader. If you did not mount the CD-ROM device to the /mnt directory, replace /mnt in the following example with the directory to which you mounted the CD-ROM device.


% dxbook /mnt/DOCUMENTATION/WORLDWIDE/L10N_guides.decw_bookshelf &

PostScript files for the language variant user guides are also available on the CD-ROM. The directories that contain the PostScript versions of these guides have pathnames that adhere to the following format:

/mnt/DOCUMENTATION/WORLDWIDE/language_territory/POSTSCRIPT

Non-English characters are embedded in the tables and text of these guides. Therefore, to print a guide in PostScript format, you must first:

  1. Install the corresponding language variant software to obtain the appropriate printer support files

  2. Set up a DEClaser 1152, DEClaser 5100, or PrintServer 17 printer to use the print filters and fonts that are appropriate for the language

    Refer to Section 6.12 and i18n_printing(5) for information about setting up printers for local languages.

Digital UNIX documentation also provides introductory reference pages on the topics of internationalization (i18n_intro(5)) and localization (l10n_intro(5)), along with reference pages for all supported languages and codesets.


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.2    Setting Locale and Language

System software that supports different language environments may provide translated message files, application resource files, help files, or some combination of these. If translations are available for message files, you can vary the language of software messages and other text by selecting a locale.

For system software, you set locale by defining the LANG environment variable. For example:


% setenv LANG en_US.ISO8859-1

Refer to the discussion of internationalization in the System Administration book and in the Command and Shell User's Guide for more detailed information on using locales and defining the associated variables for system and user setup. You can also refer to the i18n_intro(5) reference page for a discussion of locale variables such as LANG. If these locale variables are not defined, internationalized applications assume the POSIX (C) locale, which supports only English.


Note

Locales sometimes have multiple variants, usually to support different sort orders. These variants have the same name as the base locale but include a file name suffix that begins with the at sign (@). You usually assign locale names with an @ suffix to variables for specific locale categories, such as LC_COLLATE, and not to the LANG environment variable. The exception to this restriction are @ suffixes associated with codeset variants, such as @ucs4.

Many locale-specific files reside in directories whose names are constructed from the language, territory, and codeset portions of a locale name. Commands and other system applications insert the setting of the LANG variable into search paths that contain %L as one of the directory nodes. This makes it possible for software programs to find the correct set of files, such as fonts, resource files, user-defined character files, and translated reference pages, that should be used with the current locale. An @ suffix related to collation, if included in an assignment to the LANG variable, may result in applications being unable to find certain locale-specific files.


On a workstation, you also need to select a language to take advantage of text translations and local-language features available with Common Desktop Environment (CDE) and DECwindows Motif applications. For Asian languages, the correct language selection is particularly important because it enables:

See the CDE Companion for information about setting language in the Common Desktop Environment. Use the following steps to select a language in the DECwindows environment:

  1. From the Session Manager's Options menu, select Language....

  2. In the pop-up Language Options window, click on one of the displayed languages. If you set the LANG environment variable before starting your current session, you can click on Default to set the language to be consistent with the value of that variable. Note, however, that LANG settings made during your current session do not affect the setting of Default. If you click on an entry other than Default, the selected language overrides the value of the LANG environment variable or the system default locale, whichever applies.

  3. Click on the Apply button.

  4. Click on the OK button to dismiss the Language Options window.

If there is an input method that supports the selected language, you should also start the input method server before starting a DECterm window or other window where you want to work in that language (see Section 6.4). Some languages also require a keyboard setting before you begin entering text in the window (see Section 6.3).


Note

When you set the language, the change applies to all DECterm windows or other DECwindows Motif applications that start after you make the setting. The setting change does not apply to windows that are already started. You can therefore have windows running in different languages at the same time during a DECwindows Motif session.

There is a cut and paste restriction to keep in mind if you simultaneously run windows in different languages. Cutting from one window and pasting to another is supported only when both windows are set to the same language. DECterm windows emulate terminals, so data is transferred as a byte stream that has no embedded language information. Data appears on the target (paste) window according to the language applied to the target window, not according to the language applied to the source (cut) window. For example, data will be meaningless if you cut text from a Chinese window and paste it in a German window. For Chinese or Japanese, codeset converters support cut and paste operations between windows set to the same language but different codesets.



[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.3    Selecting Keyboard Type

To enter English text, a standard keyboard provides a sufficient number of keys (combined with shift states) to enter all uppercase and lowercase letters, numerals, and punctuation marks. For many other languages, the default keyboard does not provide enough keys and shift states to enter all characters.

Terminal users must be using a localized keyboard or, if their Digital keyboard includes the Compose key, using Compose-key sequences to enter non-English characters from single-byte codesets. Many Digital terminals also provide software emulation of a number of keyboard layouts for languages that are based on single-byte codesets. The user guide for each terminal explains how you can use its keyboard to enter non-English characters. Entry of multibyte characters in Asian languages requires special terminal hardware.

Workstation users can set keyboard type to be appropriate for languages for which there are standard keyboard types when appropriate support files are installed on the system. You need to set keyboard type for Western and Eastern European languages, Japanese, Thai, and Hebrew. Keyboard setting is not required for Chinese and Korean languages.

If you are using the Common Desktop Environment, refer to the CDE Companion for information about changing keyboard setting. If you are using the DECwindows envirnonment, you can change keyboard type by performing the following steps:

  1. From the Session Manager window, select Keyboard... from the Options menu.

  2. In the Keyboard Options dialog box, click on a keyboard choice.

  3. Click on Apply and then on OK to dismiss the dialog box.

Unlike the language setting, keyboard setting is a global attribute that applies to all windows. Therefore, if you are working in windows created with different language settings, you may need to change the keyboard setting as you move from one window to another.


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.3.1    Determining Keyboard Layout

If you change your keyboard from the one whose characters are printed on the hardware keys, you need to know how characters are mapped to keys and whether any characters must be entered by using a mode-switch key or mode-switch key sequence. For some languages, such as Czech, up to four different characters can be mapped to the same key. In such cases, you use the key defined as the mode switch to toggle among different sets of characters mapped to the same key. Note that mode switching is a character entry mechanism that is different from Compose sequences. A particular keyboard setting may support Compose sequences (which require one key to be defined as a multi-key), mode switching (which requires at least one key to be defined as a mode-switch key), both, or neither of these input mechanisms.

You can access a keyboard layout for your current keyboard setting in one of two ways:


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.4    Determining Input Method

For some languages, such as Japanese, Chinese, and Korean, you use an input method to enter characters, phrases, or both. An input method lets you input a character by taking multiple editing actions on entry data. The data entered at intermediate stages of character entry is called the preediting string. The X Input Method specification defines four user interaction styles:

For some of the input styles selected in an application, the preediting and status windows are not redrawn correctly if the application window is occluded by other windows. To correct this problem, click on or refocus on the application window.

Input methods for different locales typically support more than one user interaction style but not all of them. If you are working in languages that are supported by an input method, you can specify styles in priority order through the VendorShell resource XmNpreeditType. By default, this resource is defined to be:

OnTheSpot,OverTheSpot,OffTheSpot,Root

The preceding value means that on-the-spot interaction style is used if the input method supports it, else the over-the-spot is used if the input method supports it, and so forth.

There are several ways to supply the XmNpreeditType resource value to an application:

Input styles are supported by specialized input method servers. An input method server runs as an independent process and communicates with an application to handle input operations. An input method server does not have to be running on the same system as the application but must be running and made accessible to the application before the application starts. It is therefore important to start an input method server for the DECwindows Motif environment before starting a DECterm window or any other DECwindows Motif application where you want to input characters in a language that requires the server. Following are the input method servers available in the operating system, along with the input styles that each server supports:

Each of these servers has a corresponding reference page.

The applications that you run may support more, fewer, or none of the input styles supported by a particular input server. The preedit option "None" applies when an input server rejects all input styles supported by the application.

In the DECwindows environment, if an input method server is not defined as an application and started through your .Xdefaults file at login time (see Section 6.6), you have to start the server from the command line. The following example starts the input server for the Korean language:


% /usr/bin/X11/dxhangulim &

Note

The Asian-language input methods are not supported for use in xterm windows. Therefore, always choose the DECterm application to start windows where you want to display and input Asian-language characters.


In the Common Desktop Environment, the appropriate input server is automatically started when you select the language.


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.5    Determining the Input Mode Switch State

The keyboard layout for an Asian language provides keys for only a small number of characters. For Asian languages, you also use an input methodology (incorporating control-key sequences, keypad-key sequences, or options in a DECwindows application) to convert one or more characters that you can input directly from the keyboard to other kinds of characters. Section 6.4 and the language-specific user guides discuss input methods for Asian languages.

If you are using a terminal and your keyboard has a mode-switch LED (light emitting diode), the Keyboard Indicator utility switches the LED on or off, depending on whether you last toggled the special input mode on or off. When using a terminal, invoke the Keyboard Indicator utility with the following command:


% /usr/bin/X11/kb_indicator &

If you are using a workstation and your language is set to an Asian language, invoke the Keyboard Indicator utility with the -map option, as follows:


% /usr/bin/X11/kb_indicator -map &

The -map option starts a DECwindows Motif application that emulates a mode-switch LED. The application window contains one button, which is displayed as on or off, corresponding to the input mode state. You can click on this button to toggle in and out of input mode. The window is insensitive if input mode switching is not supported for your current language setting.

You can have only one Keyboard Indicator application running during your session. To stop the application, enter Ctrl/C in the window from which you started the application or enter the following kill command with the application's process id:

kill -INT process_id

If Keyboard Indicator is stopped by any other means, you must enter the following command before restarting the application:


% /usr/bin/X11/kb_indicator -clear

The preceding command erases the server status for the application so that it can be restarted cleanly.

If your language is set to Hebrew, the Keyboard Manager application (/usr/bin/X11/decwkm) provides the same function as the Keyboard Indicator window provides for Asian languages.


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.6    Setting Parameters in the .Xdefaults File

In the DECwindows environment, if you want your session to be started with a particular language, input method, or keyboard setting as the default, you can manually edit the .Xdefaults file in your home directory to add appropriate entries for language, input method (if applicable), and keyboard. Alternatively, you can select the language and keyboard options you want from DECwindows Motif Session Manager menus, quit the session, and click on the affirmative answer when asked whether you want to save current settings. Saving current settings adds lines to or modifies existing entries in your .Xdefaults file. When you log back in to start a new session, the changed defaults take effect.

Example 6-1 shows an .Xdefaults file, modified by the choice to save current settings when quitting the session. The language and keyboard settings are Japanese (DECkanji) and LK401aj, respectively. The string dxjim has been added to several lines to define the Japanese input method server as a DECwindows Motif application and automatically start the server process.


Example 6-1: Sample .Xdefaults File
DXsession.x:    3
DXsession.y:    40
DXsession.AutoStart:    dxjim
DXsession.applications: Bookreader,CDA Viewer,Calculator,\
Calendar,Cardfiler,Clock,DECterm,Differences,\
Mail,Notepad,Paint,Print Screen,XTerm,dxjim
DXsession.dxjim.command:        /usr/bin/X11/dxjim
DXsession.num_AutoStart:        1
DXsession.num_applications:     15
DXsession.AppMenu:      Bookreader,CDA Viewer,Calculator,\
Calendar,Cardfiler,Clock,DECterm,Differences,Mail,Notepad,\
Paint,XTerm,dxjim
DXsession.num_AppMenu:  13
*xnlLanguage:   ja_JP
*keyboard_dialect:      japanese lk401aj

Refer to Section 6.18 for information about using specific DECwindows Motif applications with Asian languages. Section 6.18 also discusses X Server customization that is important when ideographic fonts are used in local and remote displays.

For information about customizing session defaults in the Common Desktop Environment, see the CDE Companion.


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.7    Defining the Search Path for Specialized Components

European languages are supported by data and executable files installed at system default locations. Asian-language support for some commands and programming libraries requires files that are subordinate to the directory /usr/i18n. These files supplement or replace files in system default locations. When you install one or more of the Asian language subsets, the installation procedure makes the following adjustments to variable settings on a systemwide basis:

The file /etc/i18n_profile includes the preceding variable assignments on a systemwide basis for Bourne and Korn shell users. For C shell users, the installation process includes the file /etc/i18n_login in the file /etc/csh.login to set search paths correctly for Hebrew and Asian languages. Unless specifically noted in descriptions of particular commands or utilities, individual users do not need to change process-specific search paths to find localized binaries and utilities.


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.8    Using Terminal Interface Features for Asian Languages

The Digital UNIX Asian terminal driver (atty) and Thai terminal driver (ttty) support input and output of English and other language characters over asynchronous terminal lines. When one or both of these drivers are installed, you can set terminal line characteristics to be appropriate for the language you are using. The driver's local-language capabilities are supported in the following terminal configurations:

Refer to the atty(7) and ttty(7) reference pages for more information about these terminal drivers.

Asian-language software subsets provide an enhanced stty command that can enable support for multibyte codesets and special character manipulation capabilities, such as the following:

This section provides general information about using the stty command to enable features added to the terminal subsystem for Asian languages.

The stty utility sets or reports on terminal input/output characteristics of the device that is the utility's standard input. Table 6-1 shows the stty options that set line discipline for Asian languages.


Table 6-1: The stty Command Options for Controlling Terminal Line Discipline
stty OptionDescription
adec  Sets the terminal line discipline to handle multibyte data and the processing environment appropriate for simplified Chinese (Hanzi), traditional Chinese (Hanyu), and Korean codesets. This option is supported for both the STREAMS and BSD terminal drivers. 
jdec  Sets the terminal line discipline to handle multibyte data and the processing environment appropriate for Japanese codesets. This option sets terminal code to dec and application code to eucJP. The jdec option is supported for both the STREAMS and BSD terminal drivers. 
tdec  Sets the terminal line discipline to handle Thai characters and the processing environment appropriate for the Thai codeset. This option is supported for only the BSD terminal driver. 
dec  Sets the terminal line discipline back to the default, or standard, tty line discipline and clears characteristics that preceding stty commands may have set for application and terminal code. This option is supported for both the STREAMS and BSD terminal drivers. 

The stty command requires an appropriate locale setting to be in effect before changing terminal line discipline to support that locale. For example, to set your terminal line discipline to handle Korean, enter:


% setenv LANG ko_KR.deckorean

% stty adec

To set your terminal line discipline back to the tty default, enter:


% stty dec

Note

When your terminal line discipline is not set to the tty default and you want to switch to another nondefault option (to switch from jdec to adec, for example), first enter the stty dec command to clear any application or terminal characteristics that may not be appropriate for the new setting. The following example shows how to switch a terminal line discipline from its current setting of adec to jdec:

% stty dec

% stty jdec


The stty command entered with the -all option displays all settings for the current terminal line discipline:


% stty adec

% stty all
atty disc;speed 9600 baud; 24 rows; 80 columns
erase = ^?; werase = ^W; kill = ^U; intr = ^C; quit = ^\; susp = ^Z
dsusp = ^Y; eof = ^D; eol <undef>; eol2 <undef>; stop = ^S; start = ^Q
lnext = ^V; discard = ^O; reprint = ^R; status <undef>; time = 0
min = 1
-parenb -parodd cs8 -cstopb hupcl cread -clocal
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -iuclc
ixon -ixany -ixoff imaxbel
isig icanon -xcase echo echoe echok -echonl -noflsh -mdmbuf -nohang
-tostop echoctl -echoprt echoke -altwerase iexten -nokerninfo
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel tabs -onoeot
-odl lru size=256
-sim key= class=
tcode=dec acode=deckanji


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.8.1    Converting Between Application and Terminal Codesets

Many terminals support only one codeset, which is a problem when you work on one terminal and need to run applications in locales (particularly Asian locales) that are based on a variety of codesets. Therefore, the atty driver provides a mechanism for converting between the codeset that an application uses and the codeset that a terminal supports. You control codeset conversion by using options on the stty command line.

Note that the adec, jdec, and dec options of the stty command set terminal code and application code appropriately for Digital terminals and workstations. You need to explicitly use the tcode option, for example, if you are logging on from a Japanese terminal that does not support the standard codeset for Digital terminals.

Table 6-2 specifies stty options that explicitly set terminal and application code.


Table 6-2: The stty Options to Explicitly Set Application and Terminal Code
stty OptionDescription
acode codeset  Sets application code to codeset
tcode codeset  Sets terminal code to codeset. For most all Digital terminals and for workstations, tcode should be set to dec
code codeset  Sets both terminal code and application code to codeset

The following command lets you run an application that uses DEC Kanji (the default codeset for Japanese) on a terminal that supports only Shifted JIS (a codeset prevalent in the Japanese personal computer market):


% stty acode deckanji tcode sjis

The user guides for the Asian-language subsets provide additional details about supported application codesets and terminal codesets.


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.8.2    Command Line Editing That Supports Multibyte Characters

This section discusses how you enable and use command-line editing when Asian-language support is installed on your system.

When the terminal line discipline and terminal codeset characteristics are set appropriately for multibyte codesets, the atty driver handles command-line editing appropriately for languages supported by those codesets. For example, when you enter the control sequence to delete a character (assuming you have defined the control sequence), the entire character is deleted, regardless of how many bytes it occupies. The character being erased can be either a single-byte English character or a multibyte Asian character when both occur on the same command line.

Word deletion is also supported, even when words combine single-byte and multibyte characters. The atty driver accepts single-byte space characters, two-byte space characters (if applicable to the terminal code setting), or tab characters as word delimiters.

The erase and werase options of the stty command line let you define the control sequence for character and word deletion. For example:


% stty erase ^H

% stty werase ^J

The preceding example specifies that Ctrl/H deletes the character that precedes the cursor and Ctrl/J deletes the word preceding the cursor.

History mode is a mode of command-line editing that allows you to recall and optionally modify a command entered previously. The history mode implementation discussed here is one that is customized for Asian-language input and supported only for the BSD terminal driver. Table 6-3 specifies the stty options that enable or disable history mode editing.


Table 6-3: The stty Options to Enable/Disable History Mode
stty OptionDescription
history key  Sets the toggle key for the history mechanism and enables it. 
-history  Disables the history mechanism. 

The atty driver can maintain a history of up to 32 commands, each with a maximum length of 127 characters. Table 6-4 describes the commands you can use to edit command lines after entering the history key.


Table 6-4: Command Line Editing in History Mode
Command/KeyDescription
Ctrl/A  Move to the beginning of the line 
Ctrl/D  Delete the character under the cursor 
Ctrl/E  Move to the end of the line 
Up-arrow  Recall the previous command line in the history list 
Down-arrow  Recall the next command in the history list 
Left-arrow  Move the cursor left by one character 
Right-arrow  Move the cursor right by one character 
erase_sequence  Delete the character preceding the cursor 
werase_sequence  Delete the word preceding the cursor 

In the preceding table erase_sequence and werase_sequence indicate the control sequences defined by the stty options erase and werase, respectively.

When editing a command line in history mode, you insert characters as follows:

  1. Press the arrow keys to move the cursor to the position immediately to the right of the point where you want to insert characters.

  2. Enter the characters you want to insert.

If you enter the control characters that represent "kill," "interrupt," or "suspend," the tty driver breaks out of history mode and cancels the command line being edited.


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.8.3    Kana-Kanji Conversion: Customization of Japanese Input Options

In the Japanese language, a particular language element, such as a vowel, can be represented by more than one character. These characters can have both phonetic and ideographic variants; furthermore, the phonetic character variants can print in either two-column or single-column width. The different classes of characters, listed in the following table, require different input schemes:


Character ClassDescription
Kanji  Ideographic 
Hiragana  Phonetic 
Katakana  Phonetic Katakana characters exist in full width (two-column) and half width (single-column) formats. The single-column format of Katakana is referred to as Hankaku. 

During a single session, a Japanese user can work with Kanji, Hiragana, and Katakana characters in various combinations. The user therefore must be able to customize terminal input mode to suit the character being entered. When the input device is a JIS terminal rather than a workstation, the user must adjust line discipline and terminal code settings in the software to match hardware capabilities (for example, whether the terminal uses 7-bit or 8-bit encoding).

The tty driver supports a mechanism known as Kana-Kanji conversion. This term refers to the conversion between phonetic and ideographic character encoding and the support for keyboard entry sequences that make Japanese character selection more efficient for the user. You use the stty command to enable or disable the Kana-Kanji conversion method and other aspects of Japanese input support. The stty options that support Japanese input are described in Table 6-6 and, unless noted otherwise, are used in conjunction with the jdec option. For example, the following command sets the terminal line discipline to support Japanese character encoding and also enables Kana-Kanji conversion:


% stty jdec ikk


Table 6-6: The stty Options to Enable and Customize Japanese Input
stty OptionDescription
clause mode  Sets the character attribute for marking a clause that results from Kana-Kanji conversion.

The mode argument can be bold, underline, reverse, or none.

 

esc.alw  Changes the terminal state to "shift out" whenever a newline character is output.

This option applies only when the tcode (terminal code) stty option is set to jis7 or jis8.

 

-esc.alw  Does not change the current terminal state when a newline character is output.

This option applies only when the tcode (terminal code) option is set to jis7 or jis8.

 

henkan mode  Sets the character attribute for marking a Henkan, or conversion, region that results from Kana-Kanji conversion.

The mode argument can be bold, underline, reverse, or none.

 

ikk  Enables the Japanese input method and spawns the Kana-Kanji conversion daemon, kkcd, if it does not already exist. Depending on the terminal driver (BSD or STREAMS), use either the jx or jinkey option before using the ikk option to enable the input method.

By default, key map information is taken from (in highest to lowest priority order):

  • The file specified for the kkseq option of the stty command

  • The file defined for the environment variable JSYKKSEQ

  • The file $HOME/.jsykkseq

System default key map files for the Japanese input method reside in the directory /usr/i18n/skel/ja_JP.

Dictionaries used with the Japanese input method are taken from (in highest to lowest priority order):

  • The files defined for the environment variables JSYTANGO, JSYKOJIN, and JSYLEARN

  • The dictionary files /usr/i18n/jsy/jsytango.dic, $HOME/jsykojin.dic, and $HOME/jsylearn.dic

 

-ikk  Disables the Japanese input method and kills the kkcd daemon. 
jinkey sequence  Defines the escape sequence to activated the extended Japanese input method used with the STREAMS terminal driver. The parameter for this option can be more than one character. 
imode mode  Sets the mode for handling 8-bit code or Hankaku (single-column) Kana code when the terminal line discipline is set to dec. The mode argument can be one of the following keywords:

  • kanji, where the 8-bit code is treated as encoding for Kanji

  • hiragana, where the 8-bit code is converted to 2-column Hiragana format

  • katakana, where the 8-bit code is converted to 2-column Katakana format

  • hankaku, where the 8-bit code is handled in Hankaku (1-column) Katakana format

 
jx character  Sets the toggle character for entering the extended, or cbreak, Kana-Kanji conversion mode used with the BSD terminal driver. Users need to enter cbreak mode when working in utilities, such as dbx, that do not support the full range of Japanese input options. 
-jx  Undefines the toggle character for entering the extended Kana-Kanji conversion mode. 
kin esc_sequence  Sets the JIS Kanji "shift in" escape sequence for the JIS terminal. 
kkmap  Displays the current key map for Kana-Kanji conversion. The display is a traversal tree with a maximum length of 15 characters for each key sequence. 
kkseq file  Sets the Kana-Kanji conversion key map file for the terminal (see also the table entry for the ikk option). 
knj.bsl  Uses only one backspace to erase one Kanji character. 
-knj.bsl  Uses two backspaces to erase one Kanji character. 
knj.sp  Uses one 2-byte (zenkaku) space to blank out one Kanji character. 
-knj.sp  Uses two ASCII spaces to blank out one Kanji character. 
kout esc_sequence  Sets the JIS Kanji "shift out" escape sequence for the JIS terminal. 


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.9    Setting Up and Using User-Defined Character Databases

The national character sets for Japan, Taiwan, and China do not include some of the characters that can appear in Asian place and personal names. Such characters are defined by users and reside in site-specific databases. These databases are called user-defined character (UDC) or character-attribute databases. When users define ideographic characters, they must also define font glyphs, collating files, and other support files for the characters. You create characters with the cedit application, discussed in Section 6.9.1. You use the cgen utility, discussed in Section 6.9.2, to create font, collation, and other support files for user-defined characters. X applications can also obtain fonts for user-defined characters directly from a UDC database by using font renderers. Refer to Section 6.18.2 for information about font renderers.

Note

The system default sort command does not access the collation files created for user-defined characters. Refer to Section 6.14 for information on sorting strings that may contain these characters.


The rest of this section discusses some setup that is necessary before terminals or workstation monitors can display user-defined characters.

The atty driver includes a mechanism to allow on-demand loading of files associated with user-defined characters. You enable this mechanism and can change some of its default parameter values with the stty command. Table 6-7 describes the stty options that you use with on-demand loading.


Table 6-7: The stty Options for On-Demand Loading of UDC Support Files
stty OptionDescription
odl  Enables the software on-demand loading (SoftODL) service. 
-odl  Disables the software on-demand loading (SoftODL) service. 
odlsize size  Sets the maximum size of the ODL buffer. This size should be the same as a terminal's font-cache size. By default, size is 256 characters. 
odltype type  Sets the ODL buffer replacement strategy. Valid values for type are: fifo (first-in-first-out) and lru(least recently used) 
odldb path  Sets the path to the database and other files that support user-defined characters.

If this path is not specified, either the system default files are used or, if users are allowed to create personal UDC databases, the process default files are used.

Default pathnames for various databases are specified in the file /var/i18n/conf/cp_dirs, which is described in a subsequent section of this chapter. The cp_dirs file specifies, for example, that the systemwide defaults are /var/i18n/udc and /var/i18n/odl, and that the process defaults are $HOME/.udc and $HOME/.odl. Use the odldb option when you want to change the default odl file.

 

odlreset  Resets the ODL service and clears the internal ODL buffers. 
odlall  Displays the current settings for the ODL service. 

Figure 6-1 shows the relationship among components mentioned in the preceding list and the SoftODL service.


Figure 6-1: Components That Support User-Defined Characters



[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.9.1    Creating User-Defined Characters

The user-defined character editor (cedit) is a curses application for managing attributes of user-defined characters. The character attributes that you usually manipulate with the cedit application include:

Each user-defined character has a character attribute record, which is stored in a character attribute, or UDC, database. A UDC database can be systemwide or private. There can be only one systemwide database that all users share; however, any user can have a private database as well. The following command invokes the user-defined character editor:


% cedit

The preceding command, which includes no options, uses the default database. If you are superuser, the default database is /var/i18n/udc. If you are an unprivileged user, the default database is $HOME/.udc. There are a number of problems you can encounter when using user-defined characters that are maintained in private databases; therefore, Digital recommends that user-defined characters be maintained only in a systemwide database by a privileged user. The cedit command has a number of options and an argument, which are described in Table 6-8.


Table 6-8: The cedit Command Options
cedit Options and ArgumentsDescription
-c old_db  Converts a Japanese ULTRIX fedit font file or an Asian ULTRIX character attribute database file to the format used by cedit
cur_db  Specifies the path of a character attribute database (to override the default path). 
-h  Displays cedit syntax. 
-r ref_db  Specifies the path of the reference character attribute database (to override the default path).

This database provides a model for the UDC database on which you are working with the cedit utility.

The Reference Database item on the cedit File menu is an alternative to specifying the -r option on the cedit command line.

 


The following command displays the cedit syntax format:


% cedit -h
Usage : cedit [-h] [-c <old_db>] [-r <ref_db>] [<cur_db>]

The cedit command returns an error message if your locale setting is one that is not supported for creation of user-defined characters. Locales supported for user-defined characters include those for the Chinese and Japanese languages. After you invoke cedit, you can use the Options menu on the cedit user interface screen to change the language of user interface messages and help text back to English.

The following sections discuss the screens, menu items, editing modes, and function keys of the cedit utility.


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.9.1.1    Working on the cedit User Interface Screen
When the LANG variable is set to a supported locale, such as zh_TW.big5, the cedit command displays the user interface screen shown in Figure 6-2.


Figure 6-2: The cedit User Interface Screen


The user interface screen is divided into three areas:

To navigate the menu interface, you can use the four arrow keys to select a menu and then press either Return or the space bar to see items on that menu. You can accomplish the same goal more directly by pressing the key for the letter that is underlined in the title of the menu.

Menu items are displayed in one of the following states:

To return to a higher menu level without activating items, press Ctrl/X.

Menus on the user interface screen provide the following options for managing user-defined characters and their attributes:


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.9.1.2    Editing Font Glyphs
To create or change the font glyph of a user-defined character, you must invoke the font editing screen of cedit as follows:

  1. Select a character by choosing the Character item from the Edit menu.

    The cedit program then prompts you to enter the hexadecimal code value (without the \x prefix) for the character to be edited. The range of valid codes for UDC characters is defined in locales for Asian languages. When more than one codeset is supported for the language and territory of your current locale, cedit attempts to supply values for the additional codesets so the character can be used with all the associated locales.

    If cedit cannot determine the character's value in other codesets, you can change the codeset setting through the Options menu and then explicitly specify the character's encoding in the additional codeset. In general, it is a good idea to define user-defined characters to have values that can be mapped to other codesets supported for the language. For more information on codes for user-defined characters in specific Asian languages, refer to the language-specific user guides available with the Asian-language subsets of Digital UNIX.

    The cedit utility first searches your current UDC database for the code that you enter. If a character with that code is not found in the UDC database, the utility searches the current reference character database.

  2. Choose the Font item from the Edit menu to see options for font style/size.

  3. Choose one of the font style/size options.

    If you are creating a font glyph for use in a DECwindows Motif application, the available size options may not be appropriate for the window area where you intend to use the font. In this case, choose the smallest size option that will accommodate both dimensions of your DECwindows font.

The cedit program then displays the full-screen font editor interface as shown in Figure 6-3.


Figure 6-3: The cedit Font Editing Screen


The cedit font-editing screen has several windows:


Note

There are some hardware restrictions regarding font glyph displays in the small windows.

Font glyph displays in the reference and display windows are enabled only on certain terminals, specifically, on local-language terminals that support the Dynamic Replacement Character Set (DRCS) function.

On DECterm windows, the font glyph in the Display window does not appear in its actual size.


Fonts created in the editing window for use with system software are processed to occupy the size dimensions you selected before the editor interface screen appeared.

You can also create a font for use with DECwindows software and whose dimensions are smaller than those selected. In this case, you confine your editing operations to a rectangle that originates at the upper-left corner of the editing window and has dimensions smaller than the available editing space (see Figure 6-4). The UDC font converter that supports DECwindows considers the upper-left corner of the editing window as the font origin, generates dimensions needed to encompass the glyph based on this origin, and discards unused space outside these dimensions. This utility also allows you to explicitly specify the size dimensions for the compiled font glyphs.


Figure 6-4: Interpretation of Font Editing Screen for Sizing DECwindows Font


All functions in cedit are bound to keys; in other words, you press a key to invoke a function. Press either the PF2 or the Help key to see a diagram of how keys are bound to editing functions. Note that your online diagram may vary from the one shown here due to differences in keypad design on some systems. There are four kinds of editing modes for the cedit editing screen:

The cedit font editor uses four buffers to store bitmap data. Some of these buffers are used by editing functions, which are discussed following the buffer descriptions.

When you are working on windows in the font-editing screen, you invoke editing functions by using keystrokes or, in some cases, through a pop-up menu that appears when you press the Do key. The following functions are available on the pop-up menu:

Figure 6-5 shows the keypad keymaps for invoking different editing functions. The keypad functions, along with the letter keys used for drawing, are described in the following tables.


Figure 6-5: Keymap for cedit Functions



Table 6-9: Keys for Miscellaneous Font Editing Functions
KeyDescription
Help or PF2  Shows you which keys are bound to which editing functions. Press Help along with another key in the diagram for more information on a particular key's editing function. 
PF1  Toggles the GOLD state. Some keypad keys represent more than one function; in this case, one of those functions is invoked by pressing PF1 and then the other keypad key. 
KP.  Displays the font glyph in actual size on the display window. 
GOLD KP.  Clears the font glyph displayed in the editing window. 
U or u  Undoes the previous operation. 
Ctrl/L  Redraws the screen. 
Ctrl/Z  Suspends the cedit program. 
Do  Displays the pop-up menu for invoking SCALE, USE, and REFER functions. 
Enter  Saves changes and exits from the font editor. 
GOLD Enter  Quits the font editor without saving changes. 


Table 6-10: Keys for cedit Mode Switching
KeyDescription
PF3  Toggles Cursor mode. 
PF4  Toggles Paste mode. 
KP-  Toggles Type mode. 
KP.  Toggles Wrap mode. 


Table 6-11: Keys for Fine Control of Cursor Movement
KeyDescription
Up-arrow  Moves the cursor up. 
Down-arrow  Moves the cursor down. 
Left-arrow  Moves the cursor left. 
Right-arrow  Moves the cursor right. 
KP7  Depending on Cursor mode, moves the cursor up and left. 
KP8  Depending on Cursor mode, moves the cursor up. 
KP9  Depending on Cursor mode, moves the cursor up and right. 
KP4  Depending on Cursor mode, moves the cursor left. 
KP6  Depending on Cursor mode, moves the cursor right. 
KP1  Depending on Cursor mode, moves the cursor down and left. 
KP2  Depending on Cursor mode, moves the cursor down. 
KP3  Depending on Cursor mode, moves the cursor down and right. 
KP5  Toggles the pixel under the cursor without moving the cursor. 


Table 6-12: Keys for Moving Cursor to Window Areas
KeyDescription
GOLD KP7  Moves the cursor to the upper-left corner. 
GOLD KP8  Moves the cursor to the top row. 
GOLD KP9  Moves the cursor to the upper-right corner. 
GOLD KP4  Moves the cursor to the leftmost column. 
GOLD KP5  Moves the cursor to the center of the window. 
GOLD KP6  Moves the cursor to the rightmost column. 
GOLD KP1  Moves the cursor to the lower-left corner. 
GOLD KP2  Moves the cursor to the bottom row. 
GOLD KP3  Moves the cursor to the lower-right corner. 


Table 6-13: Keys for Drawing Font Glyphs
KeyDescription
L or l  Draws a line connecting two selected points. 
C or c  Draws a circle centered at a selected point. 
Draws an open rectangle in a selected area. 
Draws a solid rectangle in a selected area. 
Draws an open ellipse in a selected area. 
Draws a solid ellipse in a selected area. 
X or x  Mirrors the font glyph along the horizontal axis (X-axis). 
Y or y  Mirrors the font glyph along the vertical axis (Y-axis). 
Mirrors the font glyph along the 45-degree diagonal axis. 
Mirrors the font glyph along the 135-degree diagonal axis. 
F or f  Depending on cursor mode, fills an area. 
T or t  Inverts the state of all pixels. 


Table 6-14: Keys for Editing Font Glyphs
KeyDescription
KP0  Changes the display in the Edit window from the font glyph in the Edit buffer to the font glyph in the Use buffer. 
GOLD KP.  Displays font glyphs in the reference windows. 
GOLD KP0  Changes the display in the Edit window from the font glyph in the Use buffer to the font glyph in the Edit buffer. 
Select  Starts or cancels a selected area. 
Insert  Inserts the contents of the CUT-AND-PASTE buffer. 
Remove  Cuts a selected area to the CUT-AND-PASTE buffer. 
GOLD Remove  Copies a selected area to the CUT-AND-PASTE buffer. 
GOLD Up-arrow  Shifts the font glyph up by one line. 
GOLD Down-arrow  Shifts the font glyph down by one line. 
GOLD Left-arrow  Shifts the font glyph left by one column. 
GOLD Right-arrow  Shifts the font glyph right by one column. 

There is often more than one way to perform the same editing operation. The following summary discusses one method to accomplish various operations:

After you create a font glyph, you need to specify its name, input key sequence, collating value, and, optionally, the name of the class to which the character belongs. Use the Edit menu items on the cedit user interface screen to specify these attributes.


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.9.2    Creating UDC Support Files That System Software Uses

The character attributes stored in the UDC database must be directed to specific kinds of files to meet the needs of different kinds of system software. Terminal driver software and the asort utility, for example, must recognize user-defined character attributes but cannot directly access information in UDC databases. Therefore, after you create or change character attributes in a UDC database, you use the cgen command to create the following support files:

The following command creates some of these files for the UDC database ~wang/.udc:


% cgen -odl -pre -col -iks ~wang/.udc

If you enter the cgen command without specifying options, it displays statistical information about the specified database. If you enter the command without specifying a UDC database, the private user database is used for a nonprivileged user and the system database for the superuser. In other words, the database specification in the preceding example would not be needed if the user who entered the command was logged on as wang.

Table 6-15 describes cgen command options.


Table 6-15: The cgen Command Options
OptionDescription
-bdf  Creates .bdf files needed for X and DECwindows Motif applications. 
-col  Creates collating value tables. You must use the asort command, rather than the sort command, if you want to apply these tables during sort operations. 
-dpi 75|100  Sets resolution to either 75 or 100 when creating .bdf and .pcf files with the -bdf and -pcf options. 
-fprop property  Sets the font property when creating .bdf and .pcf files with the -bdf and -pcf options. 
-iks  Creates the input key sequence file. 
-merge font_pattern  Invokes the fontconverter command to merge the UDC fonts with an existing pcf font file that matches the specified font_pattern (for example, '*-140-*jisx0208*').

If you specify the -merge option, you must also specify the -pcf and -size options. The output .pcf file is in the form registry_width_ height.pcf, where registry is the font registry field of the specified font file. 

-osiz widthxheight  Specifies the font size for bdf output format.

The font size in bdf format may be different from the size of the font defined in the UDC database. The font sizes that the cedit command supports are limited; the -osiz option lets you override these size restrictions both in the .bdf file and the .pcf file generated from the .bdf file.

If the size parameters specified for the -osiz option are smaller than the size parameters specified for the -size option, only the upper left portion of the UDC font glyph is used. If the size parameters specified for the -osiz option are larger than the size parameters specified for the -size option, the lower-right portion of the resulting font glyph is filled with OFF pixels.

 

-pcf  Invokes the bdftopof command to create the .pcf files needed for X and Motif applications.

When you use this option, the cgen command also invokes the mkfontdir and xset commands to make the fonts known to the font server and available to applications.

 

-pre  Creates preload font files.

Preload font files are files that are directly and completely loaded to a terminal and some printers. Preload files are not useful when UDC databases are large because of the limited memory available on most devices. On-demand loading (ODL), which uses ODL font files, is an alternative to using preload font files.

 

-odl  Creates ODL font files.

The terminal driver handles loading of fonts from ODL font files on an incremental basis, according to need and available memory.

 



[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.9.3    Processing UDC Fonts for Use with DECwindows

The preload font files created with the -pre option of the cgen utility must be converted to bdf (Bitmap Distribution Format) or pcf (Portable Compiled Format) for use by X11 or DECwindows applications. The fontconverter command performs this conversion and can do one of two things with the converted output:

The remainder of this section discusses the fontconverter command and when to use its available options. The cgen command has comparable options; in other words, you can perform fontconverter operations indirectly by using similar options on the cgen command line.


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.9.3.1    Using fontconverter Command Options
The following example shows the simplest form of the fontconverter command, which relies on defaults for file locations, output file names, input file name extensions, and font dimensions. Assume for this example and the following discussion that the locale is set to a Japanese locale when the command is entered and that 24x24 was specified in the cedit utility when the font glyphs were created.

% fontconverter my_fonts

The preceding command converts fonts in the ~/.font/my_fonts.pre file. By default, the command creates the font files ~/.font/jisx.udc_24_24.pcf and ~/.font/jisx.udc_24_24.bdf. For the fonts to be available to applications, you can perform one of the following actions with the compiled (.pcf) fonts:

Table 6-16 lists and describes options of the fontconverter command. With the exception of -preload, the options are listed in command-line order. See Section 6.9.3.2 for examples that use these options.


Table 6-16: Options and Arguments of the fontconverter Command
Argument or OptionDescription
-merge  Specifies that command output be merged with an existing DECwindows font file.

See also the entry for the -font option.

 

-w  Specifies the font width.

Use this option when the fonts are created with a width smaller than the one specified for the cedit font editing window.

 

-h  Specifies the font height.

Use this option when the fonts are created with a height smaller than the one specified for the cedit font editing window.

 

-udc udc_font  Specifies the name of the output UDC font file.

This name is also used in the XLFD (X Logical Font Description) as the registry name. Use this option when you are creating a standalone output file (you are not merging output into an existing file) and you do not want your output file to have a default name. The default base names for output files vary according to language, as follows:

  • Japanese: jisx.udc

  • Hanyu: dec.cns.udc

  • Hanzi: gb.udc

The fontconverter command automatically appends font width and height to the output file base name.

 

-font reference_font  Specifies a reference DECwindows font file.

If you use this option with the -merge option, reference_font indicates the pcf format file with which converted font glyphs are merged.

If you use this option without the -merge option, the header of reference_font is used as a reference for generating the header of the standalone output file. Information in reference_font is also used to determine default characters in the standalone output file. A default character is a glyph (usually a square) that appears when the font does not contain any glyphs for a specified code.

 

-preload preload_font  Specifies the input file (created by the cgen -pre command).

Use this option when you want to specify the preload_font argument at an arbitrary position in the fontconverter command line. You can omit -preload when placing preload_font at the end of the command line.

 



[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.9.3.2    Controlling Output File Format
X and DECwindows Motif applications require loadable fonts in pcf format.

If you do not use the -merge option, the fontconverter command creates standalone font files in both pcf and bdf format. When you specify the -merge option, the converted fonts are merged into the pcf file specified by the -font option and a bdf file is not created.

When you merge UDC fonts with standard DECwindows fonts, you can use the combined file with all DECwindows Motif applications.

When you create independent font files, you can use the fonts with applications that explicitly load the file. If the font registry is one of the UDC registries for a particular locale, you can also use the files with standard system applications.

Note that fontconverter processing time is longer when you merge fonts into an existing file as compared to when you create independent files.

The following example:

  1. Converts preload format fonts in the file udc_font.pre

  2. Merges output into the DECwindows font JISX.UDC_*

  3. Generates the output file JISX.UDC_16_16.pcf


% fontconverter -merge -font 'JISX.UDC_*' \
udc_font.pre

The following command:


% fontconverter -udc deckanji.udc -font \
'JISX.UDC_*' udc_font.pre


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.10    Setting Up and Using the Chinese Phrase Input Method

In Korea, Taiwan, and China, users can input a complete phrase by typing a keyword, abbreviation, or acronym. This capability is provided by a phrase database and one of the following:

The phrase utility allows you to create and maintain a phrase database and, when using the VT382-D terminal, to load the database to the terminal.

Table 6-17 lists and describes basic terms associated with phrase input.


Table 6-17: Chinese Phrase Input Definitions
TermDescription
phrase  The string for the phrase that the user wants to retrieve. Each phrase is a string of any characters in the codeset of the current locale and can be a maximum of 80 bytes in length. 
phrase code  The keyword entered by the user to retrieve a phrase. Each phrase code is a string of up to 8 ASCII alphanumeric characters. 
class  A group of logically related phrases. Each class has an identifier that is a string of up to 8 ASCII characters. 
database  A set of two files: the phrase data file phrase.dat and the class data file class.dat. If a phrase database is moved from one directory to another, the two data files must be moved together.

There are two types of phrase databases: system and user. The system database is shared by all users on the system and is maintained by the system administrator. User databases are defined and maintained by individual users.

Pathnames for the system and user phrase database directories are set in the file /var/i18n/conf/cp_dirs, which is described in a subsequent section of this chapter. By default, this file sets the pathname for the system phrase database directory to be /var/i18n/sim and for the user phrase database directory to be $HOME/.sim.

Phrase database files are locale specific and reside in locale directories subordinate to the default path. For example, an individual user might create and maintain the following sets of files to support two different locales:

$HOME/.sim/zh_TW.big5/phrase.dat
$HOME/.sim/zh_TW.big5/class.dat
$HOME/.sim/zh_TW.dechanyu/phrase.dat
$HOME/.sim/zh_TW.dechanyu/class.dat

 



[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.10.1    Enabling the SIM Service

Table 6-18 lists and describes the options on the stty command line that enable and set certain characteristics for Chinese phrase input through the VT382 series of Asian terminals. These options do not apply to DECterm windows, for which phrase input is supported using mechanisms other than SIM.


Table 6-18: The stty Options Used for the SIM Service
stty OptionDescription
sim  Enables the Software Input Method (SIM) service. 
-sim  Disables the Software Input Method (SIM) service. 
simkey key  Sets the toggle key for entering phrase input mode. 
simclass class  Sets the current class name for locating the appropriate phrase in the phrase database. Classes identify subsets of information in the phrase database and are defined by using the phrase utility. 
simdb path  Sets the path for the phrase database. 
simall  Displays current SIM service settings. 


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.10.2    Creating and Maintaining a Chinese Phrase Database

You can create or maintain a phrase database by using the phrase utility. On workstations, you invoke this utility with the following command:

% phrase

The command assumes that you are using a private phrase database if you are a nonprivileged user and the systemwide phrase database if you are superuser. You can change these defaults by using the utility's menu interface.

If you are working on a VT382-D traditional Chinese terminal, you may also include one of the options described in Table 6-19. These options allow you to use the hardware phrase input method supported by your terminal.


Table 6-19: The phrase Command Options for the VT382-D Terminal
phrase OptionDescription
-user class_name   Downloads the phrase definitions for the specified class from your private phrase database to the terminal. 
-system class_name   Downloads the phrase definitions for the specified class from the systemwide phrase database to the terminal. 

On startup, the phrase utility displays a full-screen, menu-driven interface like the one in Figure 6-6.


Figure 6-6: User Interface Screen of the phrase Utility


Take the following steps to change the language of messages and other text on the user interface to English:

  1. Press the L key.

    This action displays items on the LANGUAGE menu.

  2. Press the E key.

    This action specifies English for the user interface.

The phrase utility is a curses application. To navigate the phrase utility user interface, use the following guidelines:

The phrase user interface screen includes:

The different menus allow you to perform the following operations:

The following guidelines and restrictions apply to the phrase-management operations that you can perform:


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.10.3    Using a Chinese Phrase Database

How you use a phrase database depends on whether you are using the hardware input method or the software input method (SIM) service. You can use either the hardware input method or SIM service on a VT382D Traditional Chinese terminal. For other terminals in the VT382 series of Asian terminals or for a DECterm window on a workstation, you use the SIM service.

If you are using the hardware input method with a VT382D Traditional Chinese terminal, refer to your terminal user guide for phrase input instructions.


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.10.3.1    Phrase Input Supported Through the SIM Service
Before you can use a phrase database, you use the stty command to:

If you do not want to use phrases from the class DEFAULT or from your default phrase database, use the stty command to:

When the terminal setup is complete, you can perform the following actions to retrieve a phrase:

  1. Press the key sequence specified for the simkey option of the stty command.
    
    % [Ctrl/B]

    At the bottom of your screen, you are then prompted to enter a phrase code.

  2. Type the phrase code and then press either Return or the space bar.

    The phrase is returned to the screen or, if the phrase code was not found, an error message appears.

When you want to exit from phrase input mode, press the simkey key sequence again.

While in phrase input mode, the characters that you enter are subject to the following rules:


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.10.3.2    Phrase Input in the DECwindows Motif Environment
When phrase input is supported by your language setting and the associated input method server is running, your DECwindows Motif environment includes an Input Options window. Click on the Options button in this window to:


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.11    Modifying the Database Location Configuration File

This section discusses the content and format of the file /var/i18n/conf/cp_dirs. Software services or hardware use this file to locate various kinds of databases that support input of Asian user-defined characters and phrases.

Example 6-2 shows the default entries in the cp_dirs file. You can edit these entries to change the default locations.


Example 6-2: Default cp_dirs File
#
# Attribute directory configuration file
#
#                       System location         User location
#                       ===============         =============
udc     -               /var/i18n/udc           ~/.udc
odl     -               /var/i18n/odl           ~/.odl
sim     -               /var/i18n/sim           ~/.sim
cdb     /usr/i18n/.cdb  /var/i18n/cdb           ~/.cdb
iks     -               /var/i18n/iks           ~/.iks
pre     -               /var/i18n/fonts         ~/.fonts
bdf     -               /var/i18n/fonts         ~/.fonts
pcf     -               /var/i18n/fonts         ~/.fonts

Each line in the cp_dirs file represents one entry and consists of the following format:

service_name standard_path system_path user_path

The service_name can be one of the following:

The cp_dirs file can contain only one entry for each service named. Remaining fields in the entry line consist of the following:

The preceding locations are specified as one of the following:

Comment lines in the cp_dirs file begin with the number sign (#).


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.12    Using Printer Interface Features That Support Local Languages

When you install Digital UNIX language variant subsets, your printing subsystem is enhanced with the following features:

The following sections discuss these features.


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.12.1    Print Filters for Local Language Printers

A print filter processes text data for a particular model of printer. The filter handles the device dependencies of the printer and performs device accounting functions. When each print job is completed, the print filter writes an accounting record to the file specified by the af field of the printer's entry in the /etc/printcap file.

The print filters for local-language text printers can handle text files that contain ASCII and local-language characters, or output files created by the nroff command. When processing nroff output, the filter removes multibyte characters that extend beyond the page boundary and translates nroff control sequences for underlining, superscripting, and subscripting to control sequences appropriate for the printer. However, the filter does not support multiple nroff control sequences on the same character.

The PostScript print filters can print PostScript files in addition to text and nroff output files. The memory requirement for some Asian fonts exceeds what is available on most printers, so there are specific font-loading mechanisms for loading these fonts on PostScript printers (see Section 6.12.5).

A local-language print filter can be the specified filter in both the of and if fields in the /etc/printcap file. For general information on /etc/printcap entries, refer to System Administrationand the printcap(4) reference page. Supplementary information is provided in the i18n_printing(5) reference page. A reference page for a specific language (for example, Japanese(5)) lists the names of print filters that support printing characters in that language.

The following print filters process text data for Asian languages:


LanguageFilterPrinter
Japanese  la84of  LA84-J 
Japanese  la86of  LA86-J 
Japanese  la90of  LA90-J 
Japanese  la280of  LA280-J 
Japanese  la380of  LA380-J 
Japanese  ln03jaof  LN03-J 
Japanese  ln05jaof  LN05-J 
Hanzi  la88cof  LA88-C 
Hanzi  la380cbof  LA380-CB 
Korean  la380kof  LA380-K 
Korean  dl510kaof  DL510-KA 
Hanyu  cp382dof  CP382-D 
Thai  thailpof  EP1050+ 

The following print filters process PostScript and text data for Asian languages and for some of the languages supported by locales using the ISO8859-2, ISO8859-5, ISO8859-7, and ISO8859-9 codesets:


LanguageFilterPrinter
Japanese  ln82rof  LN82R 
Czech, Hanyu, Hanzi, Hungarian, Greek, Korean, Polish, Russian, Slovak, Slovene, and Turkish  dl1152wrof  DEClaser 1152 
Thai  dl1152trof, dl1152ttmrof  DEClaser 1152 
Czech, Hanyu, Hanzi, Hungarian, Greek, Korean, Polish, Russian, Slovak, Slovene, and Turkish  dl5100wrof  DEClaser 5100 
Thai  dl5100trof, dl5100ttmrof  DEClaser 5100 

See the reference page for a specific language (for example, Japanese(5)) to find the names of print filters that support printing characters in that language.


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.12.2    Support for Local Language Printers in /etc/printcap

The /etc/printcap file describes characteristics of each printer on the system. Printer characteristics are specified by symbol/value pairs, where each symbol is a 2-character mnemonic. Each time a user submits a print job, the lpd printer daemon and printer spooling system uses information in the /etc/printcap file to determine how that job is handled.

Table 6-22 lists and describes /etc/printcap symbols that are specific to support for local-language printers. Refer to printcap(4) for descriptions of other symbols used in the /etc/printcap file. Refer to Section 6.12.3 for an example of using the lprsetup command to add several of these options to the /etc/printcap for a local-language printer.


Note

Some printers, such as the DEClaser 5100, support printing in a variety of Asian languages. In such cases, if you want to use the same printer for printing different Asian languages, the following restrictions apply:

If the preceding requirements are not met, files may occasionally be printed in the wrong locale, resulting in meaningless output. There is one problem that can result from setting up multiple print queues and directories for the same printer. If two or more jobs are sent to different queues for the same printer within a very short time, some jobs may be blocked so that they do not print. If this happens, the system manager must use the lpc command to restart the blocked jobs.


Table 6-22 lists and describes /etc/printcap symbols that are specific to local-language requirements.


Table 6-22: Symbols in /etc/printcap File for Local Language Printers
SymbolTypeDefaultDescription
ya  str  None  Double-quoted list of keyword value assignments. This assignment list specifies most of the printer options related to country-specific support. The option keywords, which are explained following this table, include flocale, font, line, odldb, odlstyle, onehalf, plocale, spcom, tacdata, and tm.

 

yd  str  None  Secondary tty line or channel for font faulting

Specify this entry for the DEClaser 1152 printer to support the font-faulting mechanism. The font-faulting mechanism, which is enabled by the alpc and ffserver commands, allows the printer to use fonts that are installed but not downloaded. Font faulting is required to support Chinese, Korean, and some other fonts. The font-faulting daemon (ffd) uses the secondary tty line to send font information to the printer.

 

yj  str  NULL  If on is specified as a value, restarts the filter specified for the of symbol for every print job. You need to define this symbol only for printers that are not country-specific and only if non-ASCII characters need to be printed on the flag page of printed output.

 

ys  num  NULL  Size of the SoftODL character cache

The ys entry is applied to text print filters. It must be present and its value must be greater than zero to enable on-demand loading of font files. These font files are the ODL support files created by the cgen utility for user-defined characters. The location of the SoftODL support files is identified by the path for systemwide ODL files in the database location configuration file /usr/var/i18n/conf/cp_dirs. ODL files for private UDC databases are not downloaded to printers.

For optimal performance, the cache value specified for the ys field should match the printer cache size. To find out the cache size for a particular printer, refer to the printer's manual.

 

yt  str  fifo  The SoftODL character replacement method

The yt entry applies to text print filters. The value for this entry can be either fifo (first-in-first-out) or lru (least recently used). You can type either uppercase or lowercase letters for these values. To find out which value is appropriate for a particular printer, refer to the printer's manual.

 


The value assigned to the ya symbol is a quoted string that can include one or more of the following options:


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.12.3    Enhancements to the lprsetup Command

The lprsetup command helps you manage the printers on your system. The command queries you for answers to questions about adding, deleting, or changing the characteristics of any printers on your system. The questions have default answers, which are delimited by brackets ([ ]). Online help is available for each question. Either press only the Return key to choose the default answer or enter a valid alternative. Follow instructions displayed by lprsetup to see the help message for each question.

After you enter characteristics for a particular printer and verify that your entries are correct, the lprsetup command creates the printer spooling directory, links the filters, and writes the entry for the printer in the /etc/printcap file.

Example 6-3 shows how you use the lprsetup command to set up a local-language printer, in this case, ln05ja.


Example 6-3: Setting Up a Local Language Printer with lprsetup

# /usr/sbin/lprsetup   (1)
Digital OSF/1 Printer Setup Program

Command < add modify delete exit view quit help >: add

Adding printer entry, type '?' for help.


Enter printer name to add [0] : ln05    (2)

For more information on the specific printer types Enter
`printer?'

Enter the FULL name of one of the following printer
types:

cp382d  dl1152w dl510ka   dl5100w  ep1050+  fx80    fx1050    hpIIP
hpIIIP  hpIIID  hpIV      hp4M     ibmpro   la50    la70      la75
la84    la86    la88      la88c    la90     la280   la324     la380
la380cb la380k  la424     lf01r    lg02     lg06    lg12      lg31
lj250   ln03    ln03ja    ln03r    ln03s    ln05    ln05ja    ln05r
ln06    ln06r   ln07      ln07r    ln08     ln08r   ln09      ln10ja
ln82r   nec290  remote   unknown


or press RETURN for [unknown] : ln05ja    (3)

.
.
.
Enter the name of the printcap symbol you wish to modify. Other valid entries are: 'q' to quit (no more changes) 'p' to print the symbols you have specified so far. 'l' to list all of the possible symbols and defaults. The names of the printcap symbols are: af br cf ct df dn du fc ff fo fs gf ic if lf lo lp mc mx nc nf of op os pl pp ps pw px py rf rm rp rs rw sb sc sd sf sh st tf tr ts uv vf xc xf xs ya yd yj yp ys yt Da Dl It Lf Lu Ml Nu Or Ot Ps Sd Si Ss Ul Xf Enter symbol name: ya (4) Enter a new value for symbol 'ya'? ["plocale=ja_JP.sdeckanji"] Do you want to enable ODL? [n] y (5) Enter symbol name: yt (6) Enter a new value for symbol 'yt'? [fifo] Enter symbol name: q (7)
.
.
.

  1. Invokes the lprsetup program.

  2. Selects a name for the printer (see Table 6-23).

  3. Selects the printer type.

  4. Specifies the printer locale.

  5. Enables on-demand loading (ODL) of printer fonts for user-defined characters. An affirmative response also sets the cache size that the SoftODL service uses. This value, by default the appropriate cache size for the printer, is stored as value of the ys symbol in the /etc/printcap file.

  6. Specifies the character replacement method that the SoftODL service uses.

  7. Quits the program to indicate no more changes are needed to the /etc/printcap file.

Table 6-23 lists Asian languages and the associated printer choices as displayed by the lprsetup script.


Table 6-23: Local Language Printers Supported by the lprsetup Command
LanguagePrinter
Japanese (text only)  la84j, la86j, la90j, la280j, la380j, ln03ja, ln05ja
Japanese (PostScript)  ln83r 
Traditional Chinese (text only)  cp382d 
Simplified Chinese (text only)  la88c, la380c 
Korean (text only)  la380k, dl510k 
Czech, Hanyu, Hanzi, Hungarian, Greek, Korean, Polish, Russian, Slovak, Slovene, and Turkish (PostScript)  dl1152w, dl5100w 
Thai (text only)  dp1050+ 
Thai (PostScript)  dl1152t, dl1152ttm, dl5100t, dl5100ttm 


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.12.4    Printing Commands and Printer Daemon

The versions of the lp, lpc, lpq, lpr, lprm, and lpstat commands with support for local-language printers use the same syntax as the default versions of the commands. The same is true for the lpd program that is indirectly invoked to run the printer daemon. The difference between the default and enhanced versions of the commands and printer daemon is that the enhanced versions can handle features added to the print subsystem for Asian languages.


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.12.5    Font Handling for PostScript Printers

The fonts for the Chinese or the Korean language do not fit in the memory of most PostScript printers. Fonts for the Thai language and some European languages do fit in memory, but are large enough that they cannot be downloaded together with fonts for other languages. Therefore, Digital UNIX provides a mechanism for selectively downloading fonts to PostScript printers. This section lists the fonts available to support different locales. It also explains how the font mechanism works and how you set up DEClaser 1152 and DEClaser 5100 printers to use fonts for languages that require specialized printer support.


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.12.5.1    Choosing Fonts for Different Locales
To support locales for most Asian and some European languages, you must set up PostScript printers so that they can use the appropriate fonts. Fonts for locales based on the ISO8859-1 and Kanji codesets are fonts that are built in to the DEClaser 1152 and DEClaser 5100 printers. However, locales based on other codesets require fonts that need to be downloaded to the printer. Section 6.12.5.2 discusses font downloading in more detail. The following list associates languages and codesets with the appropriate set of fonts:


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.12.5.2    Setting Up Print Queues With the pfsetup Command
The pfsetup utility is available to manage font downloading for print queues. This command identifies the correct downloading mechanism through the print filter name. The pfsetup command has the following format:

pfsetup[ -s| -d] [ queue_name ]...

You can use the pfsetup command in the following ways:


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.12.5.3    Downloading Fonts to the DEClaser 1152
A mechanism called font faulting works around the problem of downloading very large fonts to the DEClaser 1152 printer. Font faulting is similar to the on-demand loading (ODL) mechanism used to load user-defined characters; in other words, a subset of fonts is in the device's memory at any particular time and new fonts are swapped in as needed.

For font faulting to work, there must be two channels for printer communication. The primary channel transfers file data from the host system to the printer. The secondary channel transfers font requests and responses between the printer and the host system. You specify the secondary channel through the yd entry for the printer in the /etc/printcap file.

When the printer receives unrecognized characters, it sends font requests through its secondary communication channel. The ffd daemon serves this channel and responds to the font requests from the printer. The daemon searches the font files for the requested fonts and sends back the requested data.

You can manually start and stop the ffd daemon with the following commands:

You have to download at least one font using the pfsetup command to activate the font-faulting mechanism (refer to Section 6.12.5.1 for lists of fonts and to Section 6.12.5.2 for information about the pfsetup command). After the font-faulting mechanism is activated and until the printer is turned off, the mechanism automatically sends information for any font to the printer as required. Therefore, the printer can use all fonts that are installed on the printer's host system, including fonts that are not explicitly downloaded.


Note

Although the font-faulting mechanism allows the printer to use any installed font, there is some overhead cost when a print job uses fonts that are not downloaded to the printer. Therefore, Digital recommends that you use the pfsetup command to download fonts that print jobs most frequently use.



[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.12.5.4    Downloading Fonts to the DEClaser 5100
For a DEClaser 5100 printer with a font disk, you can use the pfsetup command to download any fonts installed on the printer's host system. The command prompts you to verify that the printer has a font disk and then downloads the fonts you choose (refer to Section 6.12.5.1 for lists of fonts and to Section 6.12.5.2 for information about the pfsetup command). The number of fonts you can download is limited by the amount of space available on the font disk. After fonts are downloaded, the printer requires no additional setup to use them.


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.13    Using Mail in a Multilanguage Environment

Digital UNIX provides enhanced versions of the following commands and utilities to handle languages based on multibyte-character codesets:

The following sections discuss enhancements to these components, along with a discussion of codeset conversion done by the comsat server. Refer to the sendmail(8), mailx(1), mh(1), comsat(8) reference pages for more complete software descriptions.


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.13.1    The sendmail Utility

The sendmail utility, which is a back end to several user commands, can be configured to pass only 7-bit data in accordance with the Simple Mail Transfer Protocol (SMTP) or to pass 8-bit data as required for multibyte-character support. By default, sendmail supports only 7-bit data. You can configure sendmail to pass mail messages in 8-bit format by using the /usr/sbin/wwsetup script or, in the Common Desktop Environment, by clicking on the Mail option of the I18N Configuration application. (The navigation path to the I18N Configuration application is Application Manager -> System Administration -> Configuration -> I18N.)

Note

Digital recommends that you not configure sendmail to use 8-bit data format because the SMTP protocol, which is widely used, does not support this format.



[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.13.2    The mailx Command and MH Commands

Both the mailx command and all applicable commands in the MH system support the conversion of mail messages between the mail interchange codeset (used to transfer messages to some hosts) and a user's application codeset. For example, if the mail interchange codeset is ISO-2022-JP and the application codeset is eucJP, the mailx or MH command converts incoming messages to the Japanese EUC codeset before displaying them.

To prevent data loss, when incoming messages are stored in mail folders, the messages are encoded in the codeset in which they are received. Codeset conversion takes place when users extract or display the messages.

To communicate mail interchange code information to other systems, outgoing messages include two additional header lines like the following:

Mime-Version: 1.0

Content-Type: TEXT/PLAIN; charset=ISO-2022-JP

The charset field in the preceding example specifies the mail interchange codeset, in this case, ISO-2022-JP. This codeset is an ISO 7-bit state-dependent codeset for Japanese characters. Codesets other than those that are part of the ISO standard, are identified by the prefix X- in the codeset name. For example, when DEC Hanyu is the codeset used for mail interchange, the following header lines are included in outgoing mail messages:

Mime-Version: 1.0

Content-Type: TEXT/PLAIN; charset=X-dechanyu

The mailx command or MH commands use the following values (listed in order of highest to lowest priority) to determine or set the mail interchange and application codesets for a particular message:


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.13.3    The comsat Server

The comsat server, which notifies users of incoming mail messages, always attempts to convert incoming mail messages from the mail interchange codeset to the user's application codeset. The comsat server uses the following values (in order of highest to lowest priority) to determine the codesets that apply to a message:


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.14    Applying Sort Orders to Non-English Characters

The sort command sorts characters according to the collation sequence defined for the current locale. A particular locale can apply one set of collation rules to the associated character set. Multiple locale names do exist, however, for the same combination of language, territory, and character set. Most often, these variations exist to offer users the choice of more than one collating sequence.

When there is more than one locale available for a given combination of language, territory, and codeset, some of the locale names include a suffix with the format @variant. To avoid problems with pathnames constructed using the %L specifier, you usually assign a locale name with an @ suffix only to the appropriate locale category variable (or variables). For example:


% setenv LANG zh_TW.eucTW

% setenv LC_COLLATE zh_TW.eucTW@radical

Supporting different collation orders through one or more locales is adequate for most languages. However, collation orders for Asian languages require additional support for the following reasons:

For the preceding reasons, the asort command was developed and is available when you install language variant subsets that support Asian languages. The asort command uses, by default, the collating order defined for the LC_COLLATE variable and supports all the flags supported by the sort command. In addition, the asort command includes the following flags:

Refer to the asort(1) reference page for more information about using this command.


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.15    Processing Reference Pages in Languages Other Than English

Programmers who supply software applications for UNIX systems frequently supply online reference pages (manpages) to document the application and its components. UNIX text-processing commands and utilities must be able to process translated versions of these reference pages for applications sold to the international market. Enhanced versions of the nroff, tbl, and man commands are included in Digital UNIX to support this requirement.


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.15.1    The nroff Command

The nroff command includes the following capabilities to support locales:

When formatting reference pages that contain ideographic characters, the nroff command treats each character as a single word. A string of ideographic characters, including 2-byte letters and punctuation characters, can be wrapped to the next line subject to the following constraints:

The standard no-first, no-last character lists are defined in nroff catalog files. For lists of these characters, refer to the language-specific user guides that are available on the CD-ROM from which you install subsets for Asian-language support.

The no-first and no-last constraints exist to prevent nroff from placing a punctuation mark or right parenthesis at the beginning of a text line or placing a left parenthesis at the end of a text line. You can turn the standard constraints on and off in source files with the .ki and .ko commands, respectively.

You can also define a private set of no-first and no-last characters with the following command:

.kl 'no-first-list'no-last-list '

The parameters no-first-list and no-last-list are strings of characters you should include in the no-first and no-last categories. You cancel a private no-first and no-last list by entering a .kl command with null strings as the parameters. For example:

.kl '''

Note

The characters specified in the .kl command override, rather than supplement, the characters in the standard set of no-first and no-last characters. Therefore, you cannot use the standard set of no-first and no-last characters together with a private set.

Using the command .kl ''' restores use of the standard set of no-first and no-last characters for the current locale.


The nroff command can format text so that it is justified or not justified to the right margin. When text is justified to the right margin, nroff inserts spaces between words in the line. Ideographic characters, although treated as words in most stages of the formatting process, differ in terms of whether they can be delimited by spaces.The characters that can be preceded by a space, followed by a space, or both are listed in the language-specific user guides that are available on line when you install language variant subsets of Digital UNIX. When right-justifying text, the nroff command inserts spaces only at the following places:

In other cases, no space is inserted between consecutive ideographic characters. Therefore, if a text line contains only ideographic characters, it may not be justified to the right margin.


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.15.2    The tbl Command

The tbl command preprocesses table formatting commands within blocks delimited by the .TS and .TE macros. The tbl command handles multibyte characters that can occur in text of languages other than English.

The tbl command is frequently used along with the neqn (equation formatting preprocessor) to filter input passed to the nroff command. In such cases, specify tbl first to minimize the volume of data passed through the pipes. For example:


% cd /usr/usr/share/ja_JP.deckanji/man/man1

% tbl od.1 | neqn | nroff -Tlpr -man -h | \
lpr -Pmyprinter

When printing text of an Asian language, you must use printer hardware that supports the language.


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.15.3    The man Command

The man command can handle multibyte characters in reference page files. By default, the man command automatically searches for reference pages in the/usr/share/locale_name /man directory before searching the /usr/share/man and /usr/local/man directories. Therefore, if the LANG environment variable is set to an installed locale and if reference page translations are available for that locale, the man command automatically displays reference pages in the appropriate language.

In addition, the man command automatically applies codeset conversion (assuming the availability of appropriate converters) when reference page translations for a particular language are encoded in a codeset that does not match the codeset of the user's locale. Refer to the man(1) reference page for information about redefining the man command search path and for more details about codeset conversion.


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.16    Converting Data Files from One Codeset to Another

Each locale is based on a specific codeset. Therefore, when an application uses a file whose data is coded in one codeset and runs in a locale based on another codeset, character interpretation may be meaningless. For example, assume that a fictional language includes a character named "quo", which is encoded as \031 in one codeset and \042 in another codeset. If the "quo" character is stored in a data file as \031, the application that reads data from that file should be running in the locale based on the same codeset. Otherwise, \031 identifies a character other than "quo".

Users, the applications they run, or both may need to set the process environment to a particular locale and use a data file created with a codeset different from the one on which the locale is based. The data file in question might be appropriate for a given language and in a codeset different from the user's locale for one of the following reasons:

You can convert a data file from one codeset to another by using the iconv command or the iconv_open, iconv, and iconv_close functions. For example, the following command reads data in the file accounts_local, which is encoded in the deckorean codeset; converts the data to the eucKR codeset; and appends the results to the file accounts_central:


% iconv -f deckorean -t eucKR accounts_local \
>> accounts_central
The iconv command and associated functions can use either an algorithmic converter or a table converter to convert data. Algorithmic converters, if installed on your system, reside in the /usr/lib/nls/loc/iconv directory; this directory is the one searched first for a converter. Table converters, if installed on your system, reside in the /usr/lib/nls/loc/iconvTable directory.
The value of the LOCPATH variable, if defined, overrides the command's default search path.

The iconv command assumes that a converter name adheres to the following format:

from-codeset_ to-codeset

For the preceding example, the iconv command would search for and use the /usr/lib/nls/loc/iconv/deckorean_eucKR converter.

Table 6-24 specifies the codeset conversions that Digital UNIX supports for English data. The user guides for the language variant subsets include tables with codeset conversions supported for Asian languages.

For detailed information about the iconv command, refer to the iconv(1) and iconv_intro(5) reference pages. For information on functions that programs can use to perform codeset conversion, refer to the iconv_open(3), iconv(3), and iconv_close(3) reference pages.


Table 6-24: Supported Codeset Conversions for English
CodesetASCII-GRISO8859-1ISO8859-1-GLISO8859-1-GR
ASCII-GR  Yes  No  No 
ISO8859-1  Yes  Yes  Yes 
ISO8859-1-GL  No  Yes  No 
ISO8859-1-GR  No  Yes  No 


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.17    Miscellaneous Information for Base System Commands

The following list includes information about features and restrictions that apply when using traditional UNIX commands in local-language environments:


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.18    Using Language Support Enhancements for DECwindows Motif Applications

In the DECwindows Motif environment, you use versions of DECwindows Motif fonts, codesets, servers, and applications that support features discussed in earlier sections of this chapter. This section provides more detail on using DECwindows Motif with Asian languages. Topics include:


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.18.1    Tuning the X Server for Ideographic Languages

Asian languages have large ideographic character sets, so all characters needed for display are not loaded into memory at the same time. Instead, only as many characters as will fit in the memory cache are simultaneously loaded. When characters needed for display are not currently cached in memory, the least recently used font glyphs are removed from the cache to make room. The font-cache mechanism allows you to display ideographic text in multiple typefaces, font sizes, and font styles without increasing the amount of memory that systems must have to support ideographic languages.

The X Server font-cache mechanism allows you to change the number of cache units and the size of these units to best accommodate the character sets used in displays. You will probably need to change the default values set for cache parameters to achieve the best performance from your system if it will display Asian-language text. Consider the following criteria when deciding on the optimal values for font caching:

To change the cache size (which is the number of cache units) and the size of each cache unit, you must modify the X Server configuration file /usr/lib/X11/xdm/Xservers. This file contains a line, similar to the following one, that starts the X Server:

:0 local /usr/bin/X11/X

You can modify this line to add definitions for cache size and unit size. For example:

:0 local /usr/bin/X11/X -cs cache_size -cu unit_size

Table 6-25 describes the options that tune the font-cache mechanism.


Table 6-25: X Server Options for Tuning the Font-Cache Mechanism
stty OptionDescription
-cs cache_size  Defines the number of cache units.

The minimum (and also default) value for this parameter is 1024. If you specify a cache size smaller than 1024, font caching is disabled. For one ideographic language, the recommended value is the lowest multiple of 1024 that accommodates the number of frequently used characters in that language.

If a workstation displays multiple ideographic languages simultaneously, you have to add together the values required for each language. Specify an even larger value if you intend to run applications, such as desktop publishing software, that require multiple font styles and sizes for each ideographic character.

 

-cu unit_size  Defines the size of each cache unit.

The minimum value for unit size is 31 bytes and the default value is 128 bytes. If you specify a value smaller than 31 bytes, the value has no effect. If a particular font requires more memory space than 128 bytes, the font-cache mechanism automatically allocates one or more additional units to store its glyphs.

 



Note

Font caching applies only to uncompressed fonts in pcf format. Font caching is not applied to any compressed fonts or to fonts in bdf format. Because font caching cannot be used with compressed fonts, the 2-byte fonts for Asian languages are not installed in compressed format.


You can calculate cache unit size with the following formula:

unit_size =
((floor(ceil((double)WIDTH / 8.0) /4.0)) + 1.0) * 4.0 * (double)HEIGHT

Consider the following calculation for a typical font size of 24x24:

unit_size in bytes
= ((floor(ceil((double) 24 / 8.0 / 4.0)) + 1.0) * 4.0 * (double) 24
= 96

For 34x34 fonts, the unit size calculation would yield 272 bytes.

Given that 96 bytes are needed to cache a 24x24 font glyph and 272 bytes is needed to cache a 34x34 font glyph, the default unit size of 128 has the following implications:

Small fonts (whose characters require a single, 128-byte unit) are used more frequently for displaying ideographic characters. Therefore, you usually have to change only the cache size to achieve acceptable performance in text displays of languages with ideographic characters.


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.18.2    Using Font Renderers for Multibyte PostScript Fonts

The operating sytem includes font renderers that allow any X application to use the PostScript fonts available for the Chinese and Korean languages. The system administrator can set up font renderers for the following kinds of fonts for use through the X Server or the font server:


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.18.2.1    Setting Up the Font Renderer for Double-Byte PostScript Fonts
The font renderer for Chinese and Korean PostScript fonts can be set up for use either through the X Server or the font server by editing the appropriate configuration file:

The renderer for Asian double-byte PostScript fonts uses its own configuration file that specifies the following information:

The default pathname for this configuration file is /var/X11/renderer/DECpscf_config; however, you can change this path by setting the DECPSCF_CONFIG_PATH environment variable.


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.18.2.2    Setting Up the Font Renderer for UDC Fonts
The UDC font renderer accesses the UDC database directly to obtain font glyphs. Therefore, X applications that use this renderer do not need to use .pcf files generated by the cgen utility.

The UDC font renderer can be set up for use either through the X Server or the font server as follows:


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.18.3    Changing the Language of the Start Session Window

The language of the window used to resume your session when it is in pause state is determined by the current language setting for your session. However, you must set the language of the Start Session window where you log in to your workstation by modifying the X Display Manager configuration file /usr/var/X11/xdm/xdm-config. In this file, define the entry for the DisplayManager*language resource to be a locale for the language you want. The following example sets this resource to a locale for Japanese:
DisplayManager*language: ja_JP.sdeckanji


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.18.4    Setting Fonts for Display of Local Languages

The system where you install language variant subsets is automatically updated with fonts required for text display in the supported languages. Usually, the new fonts are also added to the font list in the systemwide resource file /usr/lib/X11/app-defaults/Mwm that the local Motif Window Manager uses. This automatic update procedure is sufficient, except when:

The following sections explain how to work around the preceding restrictions for the DECwindows Motif environment.


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.18.4.1    Using MwmFontSetup to Update a Private Mwm File
Currently, the subsets that support Japanese and Hebrew install a language-specific version of the systemwide Mwm resource file. Therefore, if you need access to Japanese or Hebrew fonts along with access to fonts that support other languages, you cannot rely on the systemwide Mwm file and must update the font list in your private Mwm file. You can run the /usr/i18n/usr/bin/X11/MwmFontSetup script to add or remove language-specific fonts from the font list in $HOME/Mwm.

The MwmFontSetup script:

  1. Creates a backup copy of your current Mwm file

  2. Displays the fonts that are listed in the current file

  3. Asks if you want to remove or add fonts

  4. If you choose to add fonts, displays a list of languages for which support is installed and asks you to select the language whose fonts should be added to your Mwm file

  5. Allows you to repeat the steps for adding or removing fonts until you are satisfied with the font list

    At this point, you can select the EXIT option to exit from the procedure.

Note that the MwmFontSetup is useful only in the DECwindows Motif environment. In the Common Desktop Environment, applications access fonts through alias names that are mapped to the real names of the fonts. Font alias files must exist for each supported locale. For example, the font alias files for Japanese Extended UNIX Code are /usr/dt/config/xfonts/ja_JP.eucJP/75dpi/fonts.alias, /usr/dt/config/xfonts/ja_JP.eucJP/100dpi/fonts.alias, and /usr/dt/config/ja_JP.eucJP/sys.font. These alias files are installed when Digital UNIX software for Japanese language support is installed.


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.18.4.2    Accessing Local Language Fonts for Remote Displays
The information in this section is appropriate for the DECwindows Motif environment. In the Common Desktop Environment, fonts are mapped to generic alias names.

The system where Asian-language subsets are installed may function as a client in a client-server display environment. In this case, the local-language fonts must also be available to the Motif Window Managers for all the server systems where native language text is displayed. You need to install fonts for other locales either on individual systems used for remote login to the system where language variant subsets are installed or make the fonts known to the other systems through a font server. Table 6-27, Table 6-28, Table 6-30, Table 6-31, Table 6-32, and Table 6-33 describe the fonts used to display text in various local languages. You can use the /usr/bin/X11/xlsfonts command to determine which fonts are currently installed on a system.


Table 6-27: Bitmap Fonts for Asian Locales
LanguageTypefaceStyleSizes75dpi100dpi
Japanese  Gothic (ISO Latin-1)  Normal  8, 10, 12, 14, 18, 24 
  Gothic (Kanji)  Normal  8, 10, 12, 14, 18, 24 
  Gothic (Roman Kana)  Normal  8, 10, 12, 14, 18, 24 
  kmenu (ISO Latin-1)  Normal  12 
  kmenu (Roman Kana)  Normal  12 
  Mincho (ISO Latin-1)  Normal  8, 10, 12, 14, 18, 24 
  Mincho (Kanji)  Normal  8, 10, 12, 14, 18, 24 
  Mincho (Roman Kana)  Normal  8, 10, 12, 14, 18, 24 
  Screen (DECsuppl)  Normal  14, 18, 24   
  Screen (DECtech)  Normal  14, 18, 24   
  Screen (ISO Latin-1)  Normal  14, 18, 24   
  Screen (Kanji00)  Normal  10, 14, 16, 18, 24   
  Screen (Kanji11)  Normal  10, 14, 18, 24   
  Screen (Roman Kana)  Normal  10, 14, 18, 24   
Korean  Gotic  Normal  16, 24   
  Myungcho  Normal  16, 24, 32   
  Screen  Normal  18, 24   
  KS Roman  Normal  18, 24   
Simplified Chinese  FangSongTi  Normal  24, 34   
  HeiTi  Normal  16, 24, 34   
  KaiTi  Normal  24, 34   
  Screen  Normal  18, 24   
  SongTi  Normal  16, 24, 34   
Traditional Chinese  Hei (CNS11643)  Normal  16, 24   
  Hei (DTSCS)  Normal  16, 24   
  Screen (CNS11643)  Normal  18, 24   
  Screen (DTSCS)  Normal  18, 24   
  Sung (CNS11643)  Normal  24, 32   
  Sung (DTSCS)  Normal  24, 32   
Thai  Screen  Normal  14, 18, 24   
Asia (Misc.)  Screen (DEC Ctrl)  Normal  14, 18, 24   
  Screen (DRCS)  Normal  18, 24   


Table 6-28: Bitmap Fonts for *.ISO8859-2 Locales
LanguageTypefaceStyleSizes75dpi100dpi
Czech, Hungarian, Polish, Slovak, Slovene  Arial  Normal  10, 12, 14, 18, 24, 36 
    Italic  10, 12, 14, 18, 24, 36 
    Bold  10, 12, 14, 18, 24, 36 
    Bold-Italic  10, 12, 14, 18, 24, 36 
  Arial Narrow  Normal  10, 12, 14, 18, 24, 36 
    Italic  10, 12, 14, 18, 24, 36 
    Bold  10, 12, 14, 18, 24, 36 
    Bold-Italic  10, 12, 14, 18, 24, 36 
  Book Antiqua  Normal  10, 12, 14, 18, 24, 36 
    Italic  10, 12, 14, 18, 24, 36 
    Bold  10, 12, 14, 18, 24, 36 
    Bold-Italic  10, 12, 14, 18, 24, 36 
  Bookman Old Style  Normal  10, 12, 14, 18, 24, 36 
    Italic  10, 12, 14, 18, 24, 36 
    Bold  10, 12, 14, 18, 24, 36 
    Bold-Italic  10, 12, 14, 18, 24, 36 
  Century Gothic  Normal  10, 12, 14, 18, 24, 36 
    Italic  10, 12, 14, 18, 24, 36 
    Bold  10, 12, 14, 18, 24, 36 
    Bold-Italic  10, 12, 14, 18, 24, 36 
  Century Schoolbook  Normal  10, 12, 14, 18, 24, 36 
    Italic  10, 12, 14, 18, 24, 36 
    Bold  10, 12, 14, 18, 24, 36 
    Bold-Italic  10, 12, 14, 18, 24, 36 
  Courier  Normal  8, 10, 12, 14, 18, 24, 36 
    Italic  8, 10, 12, 14, 18, 24, 36 
    Bold  8, 10, 12, 14, 18, 24, 36 
    Bold-Italic  8, 10, 12, 14, 18, 24, 36 
  Monotype Corsiva  Normal  10, 12, 14, 18, 24, 36 
  Times New Roman  Normal  10, 12, 14, 18, 24, 36 
    Italic  10, 12, 14, 18, 24, 36 
    Bold  10, 12, 14, 18, 24, 36 
    Bold-Italic  10, 12, 14, 18, 24, 36 
  Terminal  Normal  14, 18 
    Double-Width  14, 18 
    Double-Width, Double-Height  28, 36 
    Narrow  14, 18 
    Double-Width, Narrow  14, 18 
    Double-Width, Double-Height, Narrow  28, 36 
    Bold  14, 18 
    Double-Width, Bold  14, 18 
    Double-Width, Double-Height, Bold  28, 36 
    Narrow, Bold  14, 18 
    Double-Width, Narrow, Bold  14, 18 
    Double-Width, Double-Height, Narrow, Bold  28, 36 


Table 6-29: Bitmap Fonts for *.ISO8859-4 Locales
LanguageTypefaceStyleSizes75dpi100dpi
Lithuanian  Arial  Normal  10, 12, 14, 18, 24, 36 
    Italic  10, 12, 14, 18, 24, 36 
    Bold  10, 12, 14, 18, 24, 36 
    Bold-Italic  10, 12, 14, 18, 24, 36 
  Arial Narrow  Normal  10, 12, 14, 18, 24, 36 
    Italic  10, 12, 14, 18, 24, 36 
    Bold  10, 12, 14, 18, 24, 36 
    Bold-Italic  10, 12, 14, 18, 24, 36 
  Book Antiqua  Normal  10, 12, 14, 18, 24, 36 
    Italic  10, 12, 14, 18, 24, 36 
    Bold  10, 12, 14, 18, 24, 36 
    Bold-Italic  10, 12, 14, 18, 24, 36 
  Bookman Old Style  Normal  10, 12, 14, 18, 24, 36 
    Italic  10, 12, 14, 18, 24, 36 
    Bold  10, 12, 14, 18, 24, 36 
    Bold-Italic  10, 12, 14, 18, 24, 36 
  Century Gothic  Normal  10, 12, 14, 18, 24, 36 
    Italic  10, 12, 14, 18, 24, 36 
    Bold  10, 12, 14, 18, 24, 36 
    Bold-Italic  10, 12, 14, 18, 24, 36 
  Century Schoolbook  Normal  10, 12, 14, 18, 24, 36 
    Italic  10, 12, 14, 18, 24, 36 
    Bold  10, 12, 14, 18, 24, 36 
    Bold-Italic  10, 12, 14, 18, 24, 36 
  Courier  Normal  8, 10, 12, 14, 18, 24, 36 
    Italic  8, 10, 12, 14, 18, 24, 36 
    Bold  8, 10, 12, 14, 18, 24, 36 
    Bold-Italic  8, 10, 12, 14, 18, 24, 36 
  Monotype Corsiva  Normal  10, 12, 14, 18, 24, 36 
  Times New Roman  Normal  10, 12, 14, 18, 24, 36 
    Italic  10, 12, 14, 18, 24, 36 
    Bold  10, 12, 14, 18, 24, 36 
    Bold-Italic  10, 12, 14, 18, 24, 36 
  Terminal  Normal  14, 18 
    Double-Width  14, 18 
    Double-Width, Double-Height  28, 36 
    Narrow  14, 18 
    Double-Width, Narrow  14, 18 
    Double-Width, Double-Height, Narrow  28, 36 
    Bold  14, 18 
    Double-Width, Bold  14, 18 
    Double-Width, Double-Height, Bold  28, 36 
    Narrow, Bold  14, 18 
    Double-Width, Narrow, Bold  14, 18 
    Double-Width, Double-Height, Narrow, Bold  28, 36 


Table 6-30: Bitmap Fonts for *.ISO8859-5 Locales
LanguageTypefaceStyleSizes75dpi100dpi
Russian  Arial  Normal  10, 12, 14, 18, 24, 36 
    Italic  10, 12, 14, 18, 24, 36 
    Bold  10, 12, 14, 18, 24, 36 
    Bold-Italic  10, 12, 14, 18, 24, 36 
  Courier  Normal  8, 10, 12, 14, 18, 24, 36 
    Italic  8, 10, 12, 14, 18, 24, 36 
    Bold  8, 10, 12, 14, 18, 24, 36 
    Bold-Italic  8, 10, 12, 14, 18, 24, 36 
  Nimrod  Normal  10, 12, 14, 18, 24, 36 
    Italic  10, 12, 14, 18, 24, 36 
    Bold  10, 12, 14, 18, 24, 36 
    Bold-Italic  10, 12, 14, 18, 24, 36 
  Plantin  Normal  10, 12, 14, 18, 24, 36 
    Italic  10, 12, 14, 18, 24, 36 
    Bold  10, 12, 14, 18, 24, 36 
    Bold-Italic  10, 12, 14, 18, 24, 36 
  Times New Roman  Normal  10, 12, 14, 18, 24, 36 
    Italic  10, 12, 14, 18, 24, 36 
    Bold  10, 12, 14, 18, 24, 36 
    Bold-Italic  10, 12, 14, 18, 24, 36 
  Terminal  Normal  14, 18 
    Double-Width  14, 18 
    Double-Width, Double-Height  28, 36 
    Narrow  14, 18 
    Double-Width, Narrow  14, 18 
    Double-Width, Double-Height, Narrow  28, 36 
    Bold  14, 18 
    Double-Width, Bold  14, 18 
    Double-Width, Double-Height, Bold  28, 36 
    Narrow, Bold  14, 18 
    Double-Width, Narrow, Bold  14, 18 
    Double-Width, Double-Height, Narrow, Bold  28, 36 


Table 6-31: Bitmap Fonts for *.ISO8859-7 Locales
LanguageTypefaceStyleSizes75dpi100dpi
Greek  Arial  Normal  10, 12, 14, 18, 24, 36 
    Italic  10, 12, 14, 18, 24, 36 
    Bold  10, 12, 14, 18, 24, 36 
    Bold-Italic  10, 12, 14, 18, 24, 36 
  Courier  Normal  8, 10, 12, 14, 18, 24, 36 
    Italic  8, 10, 12, 14, 18, 24, 36 
    Bold  8, 10, 12, 14, 18, 24, 36 
    Bold-Italic  8, 10, 12, 14, 18, 24, 36 
  Times New Roman  Normal  10, 12, 14, 18, 24, 36 
    Italic  10, 12, 14, 18, 24, 36 
    Bold  10, 12, 14, 18, 24, 36 
    Bold-Italic  10, 12, 14, 18, 24, 36 
  Terminal  Normal  14, 18 
    Double-Width  14, 18 
    Double-Width, Double-Height  28, 36 
    Narrow  14, 18 
    Double-Width, Narrow  14, 18 
    Double-Width, Double-Height, Narrow  28, 36 
    Bold  14, 18 
    Double-Width, Bold  14, 18 
    Double-Width, Double-Height, Bold  28, 36 
    Narrow, Bold  14, 18 
    Double-Width, Narrow, Bold  14, 18 
           
           
    Double-Width, Double-Height, Narrow, Bold  28, 36 


Table 6-32: Bitmap Fonts for *.ISO8859-8 Locales
LanguageTypefaceStyleSizes75dpi100dpi
Hebrew  David  Normal  8, 10, 12, 14, 18, 24 
    Italic  8, 10, 12, 14, 18, 24 
    Bold  8, 10, 12, 14, 18, 24 
    Bold-Italic  8, 10, 12, 14, 18, 24 
  Frankruhl  Normal  8, 10, 12, 14, 18, 24 
    Italic  8, 10, 12, 14, 18, 24 
    Bold  8, 10, 12, 14, 18, 24 
    Bold-Italic  8, 10, 12, 14, 18, 24 
  Gam  Normal  8, 10, 12, 14, 18, 24 
    Italic  8, 10, 12, 14, 18, 24 
    Bold  8, 10, 12, 14, 18, 24 
    Bold-Italic  8, 10, 12, 14, 18, 24 
  menu  Normal  10, 12 
  Miriam  Normal  8, 10, 12, 14, 18, 24 
    Italic  8, 10, 12, 14, 18, 24 
    Bold  8, 10, 12, 14, 18, 24 
    Bold-Italic  8, 10, 12, 14, 18, 24 
  Miriam Fixed  Normal  8, 10, 12, 14, 18, 24 
    Italic  8, 10, 12, 14, 18, 24 
    Bold  8, 10, 12, 14, 18, 24 
    Bold-Italic  8, 10, 12, 14, 18, 24 
  Narkiss Tam  Normal  8, 10, 12, 14, 18, 24 
    Italic  8, 10, 12, 14, 18, 24 
    Bold  8, 10, 12, 14, 18, 24 
    Bold-Italic  8, 10, 12, 14, 18, 24 
  Terminal  Normal  14, 18 
    Double-Width  14, 18 
    Double-Width, Double-Height  28, 36 
    Narrow  14, 18 
    Double-Width, Narrow  14, 18 
    Double-Width, Double-Height, Narrow  28, 36 
    Bold  14, 18 
    Double-Width, Bold  14, 18 
    Double-Width, Double-Height, Bold  28, 36 
    Narrow, Bold  14, 18 
    Double-Width, Narrow, Bold  14, 18 
    Double-Width, Double-Height, Narrow, Bold  28, 36 


Table 6-33: Bitmap Fonts for *.ISO8859-9 Locales
LanguageTypefaceStyleSizes75dpi100dpi
Turkish  Arial  Normal  10, 12, 14, 18, 24, 36 
    Italic  10, 12, 14, 18, 24, 36 
    Bold  10, 12, 14, 18, 24, 36 
    Bold-Italic  10, 12, 14, 18, 24, 36 
  Arial Narrow  Normal  10, 12, 14, 18, 24, 36 
    Italic  10, 12, 14, 18, 24, 36 
    Bold  10, 12, 14, 18, 24, 36 
    Bold-Italic  10, 12, 14, 18, 24, 36 
  Book Antiqua  Normal  10, 12, 14, 18, 24, 36 
    Italic  10, 12, 14, 18, 24, 36 
    Bold  10, 12, 14, 18, 24, 36 
    Bold-Italic  10, 12, 14, 18, 24, 36 
  Bookman Old Style  Normal  10, 12, 14, 18, 24, 36 
    Italic  10, 12, 14, 18, 24, 36 
    Bold  10, 12, 14, 18, 24, 36 
    Bold-Italic  10, 12, 14, 18, 24, 36 
  Century Gothic  Normal  10, 12, 14, 18, 24, 36 
    Italic  10, 12, 14, 18, 24, 36 
    Bold  10, 12, 14, 18, 24, 36 
    Bold-Italic  10, 12, 14, 18, 24, 36 
  Century Schoolbook  Normal  10, 12, 14, 18, 24, 36 
    Italic  10, 12, 14, 18, 24, 36 
    Bold  10, 12, 14, 18, 24, 36 
    Bold-Italic  10, 12, 14, 18, 24, 36 
  Courier  Normal  8, 10, 12, 14, 18, 24, 36 
    Italic  8, 10, 12, 14, 18, 24, 36 
    Bold  8, 10, 12, 14, 18, 24, 36 
    Bold-Italic  8, 10, 12, 14, 18, 24, 36 
  Monotype Corsiva  Normal  10, 12, 14, 18, 24, 36 
  Times New Roman  Normal  10, 12, 14, 18, 24, 36 
    Italic  10, 12, 14, 18, 24, 36 
    Bold  10, 12, 14, 18, 24, 36 
    Bold-Italic  10, 12, 14, 18, 24, 36 
  Terminal  Normal  14, 18 
    Double-Width  14, 18 
    Double-Width, Double-Height  28, 36 
    Narrow  14, 18 
    Double-Width, Narrow  14, 18 
    Double-Width, Double-Height, Narrow  28, 36 
    Bold  14, 18 
    Double-Width, Bold  14, 18 
    Double-Width, Double-Height, Bold  28, 36 
    Narrow, Bold  14, 18 
    Double-Width, Narrow, Bold  14, 18 
    Double-Width, Double-Height, Narrow, Bold  28, 36 

In the DECwindows Motif environment, fonts used to display local-language text in window titles, menu bars, menus, and so forth must also be added to one or more of the Motif Window Manager resource files on the server systems. These resource files are:

If users remotely log on to their home systems, where language variant subsets are installed and where they have run the MwmFontSetup script, their private Mwm resource files may already list the fonts moved to the display systems. Refer to Section 6.18.4.1 for information about the MwmFontSetup script.


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.18.5    Customizing the DECterm Window for Local Languages

The following features and restrictions apply to DECterm windows that you create when an Asian language is specified for the language setting:

For information about terminal programming enhancements that applications can use to draw ruled lines on a DECterm window, see Section 4.2.


[Return to Library]  [TOC]  [PREV]  --SECT  SECT--  [NEXT]  [INDEX] [Help]

6.18.6    Using the CDA Viewer and Converters with Asian Language Text

The CDA viewer is a DECwindows Motif application that lets you display the contents of compound documents and graphics, image files, and text files that contain ideographic characters. The viewer also supports PostScript files; however, PostScript display is supported only for languages with single-byte characters.

The viewer works with converters that convert files from one data format to another. If you want to view or convert text files that contain Asian-language characters, you must specify an option file to the CDA viewer and converters. This file must contain an entry to identify the codeset that applies to the text file being viewed, converted, or both. An option entry for text files starts with the keyword text. For Asian-language text files, this entry line must specify the appropriate character encoding (text_encoding). The following example is appropriate for a Japanese text file encoded in DEC Kanji:

text text_encoding dec_kanji

By convention, option files use the file extension .cda_options, so an appropriate name for the options file with the preceding entry might be japanese.cda_options.

The following table lists the supported encodings for text files used with CDA viewers and converters.


LanguageCodesettext_encoding Keyword
Chinese (Simplified)  DEC Hanzi  dec_hanzi 
Chinese (Traditional)  DEC Hanyu  dec_hanyu 
Japanese  DEC Kanji  dec_kanji 
Korean  DEC Hangul (Korean)  dec_hangul 

You specify an options file to CDA commands with the -O flag. The following example shows how to invoke the CDA viewer for the DECwindows Motif environment to display a Japanese text file named ja_document.txt:


% dxvdoc -f text -O japanese.cda_options \
ja_document.txt

The following example shows how to invoke a CDA converter to convert the same Japanese text file to ddif format:


% cdoc -s text -O japanese.cda_options \
-o ja_document.ddif ja_document.txt

After the text file is converted to ddif format, you can convert the ddif file to a PostScript file, as follows:


% cdoc -d ps -o ja_document.ps ja_document.ddif

Your system should have the required fonts installed if you are using the CDA converter to produce a PostScript file with Asian-language characters. The following table lists the basic fonts that the CDA converter uses for different Asian languages.


LanguageBasic Font
Korean  Munjo 
Hanyu  Sung-Light-CNS11643 or Sung-Light-DTSCS 
Hanzi  XiSong-GB2312-80 
Japanese  Ryumin-Light-EUC-H or Ryumin-Light.Hankaku 

If the preceding fonts do not exist on the system, the converter uses Courier font.

As an alternative to the option file mechanism for specifying the encoding of input text files, you can define the environment variables DDIF_READ_TEXT_GL and DDIF_READ_TEXT_GR. The following table lists the supported values and associated encoding for these variables:


DDIF_READ_TEXT_GLDDIF_READ_TEXT_GREncoding
LATIN1  MCS  MCS 
LATIN1  LATIN1  ISO Latin-1 
LATIN1  KATAKANA  ASCII-Kana 
LATIN1  KANJI  DEC Kanji 
ROMAN  MCS  Roman-MCS 
ROMAN  LATIN1  Roman 
ROMAN  KANJI  Roman-Kanji 
ROMAN  KATAKANA  Roman-Kana 
LATIN1  HANZI  DEC Hanzi 
LATIN1  HANGUL  DEC Hangul (Korean) 
LATIN1  HANYU  DEC Hanyu 


Note

The CDA converter does not support vertical writing. Therefore, vertical text prints horizontally in files produced by the converter.


For complete information about CDA viewers and converters, refer to the cda(4) reference page. The cda(4) reference page also lists additional reference pages that describe specific CDA commands. Only a few of those commands and their options have been described here.