This appendix contains information about language-specific implementations of Palm OS®. Read it if you are localizing to these languages to determine the correct programming practices for these languages.
Notes on the Japanese Implementation
Notes on the Japanese Implementation
This section describes programming practices for applications that are to be localized for Japanese use. It covers:
Japanese Character Encoding
Japanese Character Input
Displaying Japanese Strings on UI Objects
Displaying Error Messages
Japanese Character Encoding
The character encoding used on Japanese systems is based on Microsoft code page 932. The complete 932 character set (JIS level 1 and 2) is supported in both the standard and large font sizes. The bold versions of these two fonts contain bolded versions of the glyphs found in the 7-bit ASCII range, but on some devices, the single-byte Katakana characters and the multi-byte characters are not bolded.
Japanese Character Input
On Japanese devices, users can enter Japanese text using Latin (ASCII) characters, and special software called a front-end processor (FEP) transliterates this text into Hiragana or Katakana characters. The user can then ask the FEP to phonetically convert Hiragana characters into a mixture of Hiragana and Kanji (Kana-Kanji conversion).
Figure 8.1 Handwriting recognition pinlet on a Japanese device

The Graffiti® 2 handwriting recognition pinlet for Japanese ROMs has four buttons that control the FEP transliteration and conversion process. These four FEP buttons are arranged vertically to the left of the handwriting recognition area. The top-most FEP button tells the FEP to attempt Kana-Kanji conversion on the inline text. The next button confirms the conversion results and removes the first clause from the inline text. The third button toggles the transliteration mode between Hiragana and Katakana. The last button toggles the FEP on and off.
Japanese text entry is always inline, which means that transliteration and conversion happen directly inside of a field. The field code passes events to the FEP, which then returns information about the appropriate text to display.
During inline conversion, the Graffiti 2 space stroke acts as a shortcut for the conversion FEP button and the return stroke acts as a shortcut for the confirm FEP button.
Displaying Japanese Strings on UI Objects
To conserve screen space, you should use half-width Katakana characters on user interface elements (such as buttons, menu items, labels, and pop-up lists) whenever the string contains only Katakana characters. If the string contains a mix of Katakana and either Hiragana, Kanji, or Romaji, then use the full-width Katakana characters instead.
Displaying Error Messages
You may have code that uses the macros DbgOnlyFatalErrorIf()
and DbgOnlyFatalError()
to determine error conditions. If the error condition occurs, the system displays the file name and line number at which the error occurred along with the message that you passed to the macro. Often these messages are hard-coded strings. On Japanese systems, Palm OS traps the messages passed to these two macros and displays a generic message explaining that an error has occurred.
You should only use DbgOnlyFatalErrorIf()
and DbgOnlyFatalError()
for totally unexpected errors. Do not use them for errors that you believe your end users will see. If you wish to inform your users of an error, use a localizable resource to display the error message instead of DbgOnlyFatalErrorIf()
or DbgOnlyFatalError()
.