Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

asort(1)

locale(1)

lp(1)

lpr(1)

dxjim(1X)

xset(1X)

lpd(8)

lprsetup(8)

printcap(4)

code_page(5)

deckanji(5)

eucJP(5)

i18n_intro(5)

i18n_printing(5)

iconv_intro(5)

iso2022jp(5)

jiskanji(5)

keyboard(5)

l10n_intro(5)

sdeckanji(5)

shiftjis(5)

Unicode(5)

Japanese(5)  —  Macro Packages and Conventions

NAME

Japanese, japanese − Introduction to Japanese language support

DESCRIPTION

There are two national standards that specify the Japanese character sets used for information interchange. The JIS X0201 standard specifies a single-byte character set that consists of Roman letters and Katakana characters.  The JIS X0208 standard specifies a primary set of Japanese ideographic characters.  The operating system supports both standards with coded character sets (codesets), locales, device, and other kinds of system files. 

Codesets

There are several codesets available to support Japanese. The following list specifies both the codesets and the strings that represent those codesets in the names of locales, converters, and other kinds of system files:

DEC Kanji, deckanji
See deckanji(5) for more information about the DEC Kanji codeset. 

Japanese EUC (Extended UNIX Code), eucJP
See eucJP(5) for more information about the Japanese EUC codeset. 

Super DEC Kanji, sdeckanji
See sdeckanji(5) for more information about the Super DEC Kanji codeset. 

Shift JIS, SJIS
See shiftjis(5) for more information about the Shift JIS codeset. 

JIS KANJI (JIS7 or JIS8)
JIS KANJI characters can be either JIS7 (representing characters in 7-bit bytes) or JIS8 (representing characters in 8-bit bytes). Depending on the kana input value, the string that represents the JIS7 codeset is either jis7,JIS7, or jiskanji7. The string that represents the JIS8 codeset is jis8. 

JIS KANJI codesets are supported only for conversion operations as indicated by the following table.  These codesets are not supported by locales or for direct input and output. 

Codeset Codeset Conversion Terminal Code Conversion
jis7 Y Y
jiskanji7 Y N
jis8 N Y

See jiskanji(5) for more information about JIS KANJI codesets, stty(1) for information about terminal code conversion, and iconv_intro(5) for information about codeset conversion. 

ISO 2022-JP, iso2022JP
The ISO 2022-JP codeset is supported only for codeset conversion. It is not supported by locales, for terminal code conversion, or for direct input and output.

See ISO-2022-JP(5) for more information about the ISO 2022-JP codeset. 

Extended ISO 2022-JP, iso2022JPext
The ISO 2022-JPext codeset (which is an extended version of ISO 2022-JP) is supported only for codeset conversion.  It is not supported by locales, for terminal code conversion, or for direct input and output.

See ISO-2022-JP(5) for more information about the Extended ISO 2022-JP codeset. 

Locales

The following list specifies Japanese locales for Japan and the codesets they support:

ja_JP.deckanji, for DEC Kanji
ja_JP.eucJP, for Japanese EUC
ja_JP.sdeckanji, for Super DEC Kanji
ja_JP.SJIS, for Shift JIS

You can use the locale command (see locale(1)) to display the names of locales installed on your system. See i18n_intro(5) for information on setting locale. 

In a windows environment, you also need to set the session language.  The way you do this depends on which windows environment you are using:

       •In the Common Desktop environment (CDE), use the Language menu accessed from the login window Options button. 

       •In the DECwindows environment, use the Language Option dialog box invoked from the Session Manager’s Options menu. 

Keyboards, Servers, and Input Methods

The operating system supports the following Japanese keyboards:

LK201-AJ
A Japanese version of the LK201 keyboard.

LK401-AJ
A Japanese version of the LK401 keyboard.

LK401-JJ
A Japanese version of the LK401 keyboard.  This model provides JIS layout and special keys for Japanese input methods.

LK401-BJ
A Japanese version of the LK401 keyboard. This model provides ANSI layout and special keys for Japanese input methods.

LK421-AJ
A Japanese version of the LK421 keyboard. This model does not have special keys for Japanese input methods.

LK421-JJ
A Japanese version of the LK421 keyboard.  This model provides UNIX layout and special keys for Japanese input methods.

PCXAJA-JJ
A Japanese version of the PC keyboard.

For the DECwindows Motif environment, the operating system provides the dxjim input server to support Japanese input methods.  Refer to the dxjim(1X) reference page for more information. You can start this input server with the following command:

% /usr/bin/X11/dxjim &

The input server must be running before you start the application window where you enter Japanese characters. 

There are two main mechanisms for entering Japanese characters:

       •Kana input, for entering Kana characters

The Kana input mechanism is provided by the firmware of Japanese video terminals (see the Japanese Terminals section). 

       •Input methods, for entering two-byte Kanji characters, Kana characters, letters, and symbols defined in JIS X0208.  Input methods allow characters to be entered and converted to other characters.  The four input methods are as follows:

Romaji-to-Kanji
Kana-to-Kanji
Internal Code
JIS Ku-ten Code

In the DECwindows Motif environment, you must load a Japanese key mapping table (keymap) that is appropriate for your keyboard. See keyboard(5) for information on loading a keymap. 

All the Japanese keyboards and keymaps support locking-shift mode switching.  In other words, you can enter English characters in the Mode Switch Off state and Kana characters in the Mode Switch On state. The keys used to toggle the input mode differ according to whether you are using a Japanese VT terminal or, in the DECwindows Motif environment, the keymap that has been loaded. 

       •For Japanese VT terminals, press the Compose key

       •In the DECwindows Motif environment:

       —
For LK201-J∗ keymaps, hold down the Compose key and press the Space bar

       —
For other keymaps, press the Compose key

These keys are defaults and can be changed by the user. 

For operation within the DECwindows Motif environment, the operating system provides the dxjim input server, which must be started before any window where Japanese input methods are used. Use the following command to start this server:

% /usr/bin/X11/dxjim &

Japanese Terminals

The operating system supports the VT282-J, VT382-J, and VT383-J terminals for Japanese. 

Running DECwindows Motif Applications

X or Motif applications require non-ASCII fonts to display Japanese characters.  Therefore, you must set the font path appropriately before starting an application that displays Japanese characters. An application can find Japanese fonts in either of the following directories:

       •/usr/i18n/lib/X11/fonts/decwin/75dpi, for low resolution display

       •/usr/i18n/lib/X11/fonts/decwin/100dpi, for high resolution display

Before you start a Japanese application, use the following command to check the font path:

% xset q

If one of the directories in the preceding list is not in the font path, the following example shows how to add the directory.  You can substitute 100dp for 75dpi if you want high resolution display. 

% xset +fp /usr/i18n/lib/X11/decwin/75dpi/
% xset fp rehash

After ensuring that the font path is set correctly and that the dxjim input server is running (see the section on input devices, servers, and methods), you can use the following steps to start a Japanese application:

     1.If you have not already made the desired language setting, then:

     a.Choose Language from the Option menu. 

     b.Select the Japanese language that you want the application to use. 

The available Japanese language options reflect the different codesets supported by Japanese locales, as follows:

Japanese
This language option is equivalent to Japanese (EUC). 

Japanese (DEC Kanji)

Japanese (EUC)

Japanese (Super DEC Kanji)

Japanese (Shift JIS)

     c.Press the OK button. 

     2.Choose the application you want to start from the Application menu. 

Printers

The operating system supports the following Japanese printers. The associated print filter is noted in parentheses following the printer name. 

       •Japanese dot-matrix printers

LA84-J (la84of)
LA86-J (la86of)
LA90-J (la90of)
LA280-J (la280of)

       •Japanese graphic line printers

LA380-J (la380of)

       •Japanese laser printers

LN03-J (ln03jaof)
LN05-J (ln05jaof)

       •Japanese PostScript printers

LN82R (ln82rof)

PostScript fonts for Japanese printers must be printer resident. The operating system does not provide fonts that you can manually or dynamically download to a printer. 

Codeset Conversion

The following codeset converters are available for Japanese:

       •deckanji_ISO-2022-JP (DEC Kanji to ISO 2022-JP)

       •deckanji_ISO-2022-JPext (DEC Kanji to ISO 2022-JPext)

       •deckanji_JIS7 (DEC Kanji to JIS7)

       •deckanji_eucJP (DEC Kanji to Japanese EUC)

       •deckanji_iso-2022-jp (DEC Kanji to ISO 2022−JP)

       •deckanji_iso-2022-jpext (DEC Kanji to ISO 2022−JPext)

       •deckanji_jiskanji7 (DEC Kanji to JIS7)

       •deckanji_sdeckanji (DEC Kanji to Super DEC Kanji)

       •deckanji_SJIS (DEC Kanji to Shift JIS)

       •deckanji_UCS-2 (DEC Kanji to UCS-2)

       •deckanji_UCS-4 (DEC Kanji to UCS-4)

       •deckanji_UTF-8 (DEC Kanji to UTF-8)

       •eucJP_deckanji (Japanese EUC to DEC Kanji)

       •eucJP_ISO-2022-JP (Japanese EUC to ISO 2022−JP)

       •eucJP_ISO-2022-JPext (Japanese EUC to ISO 2022−JPext)

       •eucJP_JIS7 (Japanese EUC to JIS7)

       •eucJP_jiskanji7 (Japanese EUC to JIS7)

       •eucJP_SJIS (Japanese EUC to Shift JIS)

       •eucJP_sdeckanji (Japanese EUC to Super DEC Kanji)

       •eucJP_UCS-2 (Japanese EUC to UCS-2))

       •eucJP_UCS-4 (Japanese EUC to UCS-4)

       •eucJP_UTF-8 (Japanese EUC to UTF-8)

       •ISO-2022-JP_deckanji (ISO 2022−JP to DEC Kanji)

       •ISO-2022-JP_SJIS (ISO 2022−JP to Shift JIS)

       •ISO-2022-JP_eucJP (ISO 2022−JP to Japanese EUC)

       •ISO-2022-JP_sdeckanji (ISO 2022−JP to Super DEC Kanji)

       •ISO-2022-JPext_SJIS (ISO 2022−JPext to Shift JIS)

       •ISO-2022-JPext_deckanji (ISO 2022−JPext to DEC Kanji)

       •ISO-2022-JPext_eucJP (ISO 2022−JPext to Japanese EUC)

       •ISO-2022-JPext_sdeckanji (ISO 2022−JPext to Super DEC Kanji)

       •JIS7_SJIS (JIS7 to Shift JIS)

       •JIS7_deckanji (JIS7 to DEC Kanji)

       •JIS7_eucJP (JIS7 to Japanese EUC)

       •JIS7_sdeckanji (JIS7 to Super DEC Kanji)

       •jiskanji7_SJIS (JIS7 to Shift JIS)

       •jiskanji7_deckanji (JIS7 to DEC Kanji)

       •jiskanji7_eucJP (JIS7 to Japanese EUC)

       •jiskanji7_sdeckanji (JIS7 to Super DEC Kanji)

       •sdeckanji_deckanji (Super DEC Kanji to DEC Kanji)

       •sdeckanji_eucJP (Super DEC Kanji to Japanese EUC)

       •sdeckanji_ISO-2022-JP (Super DEC Kanji to ISO 2022−JP)

       •sdeckanji_ISO-2022-JPext (Super DEC Kanji to ISO 2022−JPext)

       •sdeckanji_JIS7 (Super DEC Kanji to JIS7)

       •sdeckanji_SJIS (Super DEC Kanji to Shift JIS)

       •sdeckanji_UCS-2 (Super DEC Kanji to UCS-2)

       •sdeckanji_UCS-4 (Super DEC Kanji to UCS-4)

       •sdeckanji_UTF-8 (Super DEC Kanji to UTF-8)

       •SJIS_deckanji (Shift JIS to DEC Kanji)

       •SJIS_eucJP (Shift JIS to Japanese EUC)

       •SJIS_ISO-2022-JP (Shift JIS to ISO 2022−JP)

       •SJIS_iso-2022-jp (Shift JIS to ISO 2022−JP)

       •SJIS_ISO-2022-JPext (Shift JIS to ISO 2022−JPext)

       •SJIS_ISO-2022-jpext (Shift JIS to ISO 2022−JPext)

       •SJIS_JIS7 (Shift JIS to JIS7)

       •SJIS_jiskanji7 (Shift JIS to JIS7)

       •SJIS_sdeckanji (Shift JIS to Super DEC Kanji)

       •SJIS_UCS-2 (Shift JIS to UCS-2)

       •SJIS_UCS-4 (Shift JIS to UCS-4)

       •SJIS_UTF-8 (Shift JIS to UTF-8)

       •UCS-2_deckanji (UCS-2 to DEC Kanji)

       •UCS-2_eucJP (UCS-2 to Japanese EUC)

       •UCS-2_sdeckanji (UCS-2 to Super DEC Kanji)

       •UCS-2_SJIS (UCS-2 to Shift JIS)

       •UCS-4_deckanji (UCS-4 to DEC Kanji)

       •UCS-4_eucJP (UCS-4 to Japanese EUC)

       •UCS-4_sdeckanji (UCS-4 to Super DEC Kanji)

       •UCS-4_SJIS (UCS-4 to Shift JIS)

       •UTF-8_deckanji (UTF−8 to DEC Kanji)

       •UTF-8_eucJP (UTF−8 to Japanese EUC)

       •UTF-8_sdeckanji (UTF−8 to Super DEC Kanji)

       •UTF-8_SJIS (UTF−8 to Shift JIS)

For more information about codeset converters, see the iconv_intro(5) reference page.  For information on UCS-2, UCS-4, and UTF-8, see Unicode(5). 

Note

There are no codeset converters available to support the Microsoft code page for Japanese because an available UNIX codeset, Shift JIS (SJIS), provides character encoding identical to the cp932 code page. For information about PC code pages, see code_page(5). 

EXAMPLES

This section shows the steps in the DECwindows environment to set up Japanese language support, start the DECterm application, display a reference page translated to Japanese, and toggle input mode to Japanese. 

     1.Make sure that the font path includes either the 75dpi or 100dpi directory that contains fonts for Asian languages:

% xset q

If neither /usr/i18n/lib/decwin/75dpi/ nor /usr/i18n/lib/decwin/75dpi/ is included in the display, add one of them to the font path.  For example:

% xset +fp /usr/i18n/lib/decwin/75dpi/
% xset fp rehash

     2.If it is not already running, start the dxjim input server:

% /usr/bin/X11/dxjim &

     3.Choose Keyboard from the Option menu

     4.In the the Keyboard Options dialog box, select the keymap most appropriate for your keyboard. Then click on the Apply and OK buttons. 

     5.Choose Language from the Option menu, select one of the Japanese language optons in the Language Options dialog box, and click on the OK button

     6.Create a new DECterm window by choosing DECterm from the Application menu. 

     7.Display the ls(1) reference page:

% man ls

     8.By default, your input mode allows you to type English characters.  To enter Japanese characters, toggle the input mode to Japanese by pressing the Compose key or (for LK201 keymaps) by holding down the Compose key while pressing the space bar. 

SEE ALSO

Commands: asort(1), locale(1), lp(1), lpr(1), dxjim(1X), xset(1X), lpd(8), lprsetup(8)

Files: printcap(4)

Others: code_page(5), deckanji(5), eucJP(5), i18n_intro(5), i18n_printing(5), iconv_intro(5), iso2022jp(5), jiskanji(5), keyboard(5), l10n_intro(5), sdeckanji(5), shiftjis(5), Unicode(5)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026