Chinese in Mac OS X 10.7 Lion

What's New

  • The data and framework of the Chinese input methods is improved. Both Chinese Pinyin input modes in Lion support filtering by tones (via option-tab) with Dynamic Prompt on and allow the use of tone numbers (optional) when typing input strings with Dynamic Prompt off. You can also order candidates by radical or number of strokes, including an extended list of candidates. The horizontal candidate window can be expanded to show more than one row of candidates.
  • The accuracy of Chinese handwriting recognition is improved, with additional punctuation, Roman symbols, and more. The handwriting input window can now be moved.
  • The Character Viewer is redesigned, allowing the user to customize the categories of scripts and characters it displays.
  • TextEdit now supports vertical-text layout for Chinese and Japanese. This support is built into Lion's text engine, so look for this feature in future versions of other applications that use it (e.g., Pages, Jedit X). In addition, Safari supports the upcoming CSS3 vertical-text layout specifications [W3C working draft].
  • VoiceOver includes voices for Chinese (China), Chinese (Hong Kong), and Chinese (Taiwan). There are built-in versions of the voices, but for best results you should download the high-quality versions via System Preferences > Speech > Text to Speech > System Voice: > Customize... [The three Chinese voices together are a 1.2 GB download.]

Installation

Under the Language tab in System Preferences... Language & Text, you will find a list of languages supported by OS X 10.7:

Language tab

The language at the top of the list is used by the Finder. Adjustments to this list affect the default font behavior in applications that use Apple's built-in text engine, like Mail, Safari, and Pages. Unless you are running the system (i.e., the Finder) in an East Asian language, we recommend the following order: Simplified Chinese (简体中文), Traditional Chinese (繁體中文), Japanese (日本語), Korean (한국어).

The "Order for sorted lists" pop-up menu has seven choices that affect Chinese:

  1. Standard ~ Unicode order. Sorts by Unicode block, then by radical-stroke.
  2. Chinese ~ Sorts by pronunciation, using Hanyu Pinyin.
  3. Chinese (Pinyin Sort Order) ~ Same as above.
  4. Chinese (Radical-Stroke Sort Order) ~ Sorts all Unicode CJK Unified Ideographs (CJKUI) blocks together by radical-stroke.
  5. Chinese (Simplified Chinese Sort Order - GB2312) ~ Sorts by GB code.
  6. Chinese (Stroke Sort Order) ~ Sorts GB 18030 by total number of strokes, then radical.
  7. Chinese (Traditional Chinese Sort Order - Big5) ~ Sorts by Big Five code.

Note: Unless otherwise noted, these only sort the original CJKUI block. Extensions A, B, C, and D follow in turn, each sorted by radical-stroke.

Fonts

Chinese-capable fonts in Lion:

  • Two Unicode-encoded font collections in the /System/Library/Fonts folder:
    • [STHeiti Light.ttc] = Heiti SC Light and Heiti TC Light
    • [STHeiti Medium.ttc] = Heiti SC Medium and Heiti TC Medium
    • These contain the Unicode CJK Unified Ideographs block, Extension A, and a selection of 6,217 characters from Extension B. For details, see Fonts.
  • Seven standard GB 18030 fonts in the /Library/Fonts folder: 华文黑体 ST Hei Regular (STHeiti), 华文细黑 ST Hei Light (STXihei), 华文楷体 ST Kai Regular (STKaiti), 华文宋体 ST Song Regular (STSong), 华文仿宋 ST Fangsong Regular (STFangsong), and Hiragino Sans GB W3 and W6.
    • STXihei includes 4,235 additional characters for Vietnamese Hán-Nôm.
  • Two GB 2312 fonts in the /Library/Fonts folder: Hei and Kai.
  • Two Big-5E plus HKSCS 2001 fonts in the /Library/Fonts folder: LiHei 儷黑 Pro and LiSong 儷宋 Pro.
    • These contain a selection of 17,607 characters from the CJK Unified Ideographs block, 512 from Extension A, and 1,640 from Extension B.
  • Three standard Big Five fonts in the /Library/Fonts folder: Apple LiGothic, Apple LiSung, and BiauKai.
  • Arial Unicode MS is installed in the /Library/Fonts folder.
  • A GB 18030 bitmap font is installed in the /Library/Fonts folder.

Getting Started

Input Menu

Under the Input Sources tab in System Preferences... Language & Text, you will find check boxes that activate the components of the Chinese input methods and cause them to appear in the Input menu. Make sure that the "Show Input menu in menu bar" box is also checked. You can also check the Keyboard & Character Viewer box to make them appear, and so on:

Input sources

Note: "Trackpad Handwriting" only appears if you have a multi-touch trackpad. For details, see Handwriting Input.

"Keyboard Shortcuts..." leads to the Keyboard Shortcuts tab in System Preferences... Keyboard, you will find two keyboard shortcuts listed under the Keyboard & Text Input heading. To enable them, you'll also need to disable those under the Spotlight heading:

  • Command-space [⌘Space] ~ Selects the previous input source. Toggles back and forth between the last two input sources selected in the Input menu.
  • Option-command-space [⌥⌘Space] ~ Selects the next input source. Cycles through the keyboards and input methods in the Input menu.

The Chinese input methods and plug-ins you choose will appear right away in the Input menu itself, which appears on the right side of the Menu bar:

Input menu

To activate a keyboard or input method, choose it from the menu. Its icon will appear in the Menu bar and it will have a check mark beside it in the menu. In the above example, the U.S. Extended keyboard is followed by two Japanese input modes and then the two Chinese Pinyin input modes. Next comes QIM, the most powerful input method available for OS X, and then Biaoyin, a CIN plug-in input method for typing Chinese romanizations. The next section holds Trackpad Handwriting, which works for either Simplified or Traditional.

Input Methods

Help

The built-in Chinese input methods include a full set of English-language help instructions. To access this Help, select an input mode in the Input menu. Its extended menu will appear, with Help at the bottom.

Simplified-Chinese Pinyin, for example, looks like this:

SCIM menu

Note: Apple's Help for the Chinese input methods is excellent. What follows below is a general description, not designed to be especially helpful.

Key Sequences

After you have typed an appropriate input string for the input mode you are using, you can:

  • Use space to invoke the standard Candidate window. [Dynamic Prompt off.]
  • Use shift-space to invoke Structural Pinyin. [Pinyin only.]
  • Use option-shift-space to expand the horizontal Candidate window or to extend the list of candidates ["More..."]. You can also use the up/down arrows for this:

Candidate window

  • Use tab to change the candidate sorting mode:
    • Standard [Pinyin, Zhuyin] = Displays candidates by frequency of use.
    • Radical [Pinyin, Zhuyin] = Displays candidates by radical, then number of remaining strokes.
    • Stroke [Pinyin] = Displays candidates by initial stroke, then total number of strokes.

The return key always inputs whatever is displayed inline: either the input string or the selection in the Candidate window. Use caps lock to use your keyboard normally (i.e., to type in English or whatever) from within the Chinese input methods.

Pinyin

Pinyin - Simplified (GB 2312) and Pinyin - Traditional (Big-5E and HKSCS-2001) behave the same. There are basically two modes, depending on whether Dynamic Prompt is turned on or off:

  • With Dynamic Prompt turned on, the number keys are used to select directly from the Candidate window. Use option-tab to filter candidates by tone.
  • With Dynamic Prompt turned off, the number keys are used for tone numbers (optional) as you type the the input string, before you invoke the Candidate window.

Zhuyin

The Zhuyin input mode in Lion no longer supports the Zhuyin ershi [注音二式] romanization or keyboards other than the "Standard" keyboard. With Dynamic Prompt turned on, tone marks are required (use space for first tone). With Dynamic Prompt turned off, tone marks are optional.

Structural Pinyin

Both Pinyin input modes provide access to the "Structural Pinyin" [結構拼音/结构拼音] input mode, which covers the GB 18030-2000 character set. Standard Pinyin readings are used for the graphic and/or phonetic components of the structure of the character, usually left-right, top-bottom, inner-outer. These are listed as Chaizi [拆字, "Hanzi Components"] in the "Hanzi (Simplified)" section of the Character Viewer.

The purpose of this is to allow you to use Pinyin to input obscure characters that you don't otherwise know how to pronounce. For example, you probably don't know the pronunciation of 龘 (dá), but with a basic reading knowledge of Chinese you can see that it is composed of three dragons [龍 lóng], and thus you know its Structural Pinyin reading is long-long-long.

Note: In both the SCIM and TCIM input menus, this feature is translated into English as "Composition Candidates". The (simplified) Chinese text is 拆字组合的候选字.

Handwriting Input

Requires a Magic Trackpad or a MacBook with a built-in Multi-Touch Trackpad. Supports either Simplified or Traditional Chinese, depending on which Chinese input method is active or was last used. See Apple's technical support article on this topic, which includes videos:

Magic Trackpad: Using Trackpad Handwriting with Simplified or Traditional Chinese

Framework

The SCIM and TCIM components are located in the /System/Library/Input Methods folder. These do not contain user data.

The user data for the Chinese input methods is stored in your Home ~/Library/Dictionaries folder. [Hidden by default in Lion. Hold down the option key as you access the Go menu in the Finder.] You can reset your dictionary and/or frequency data by trashing the various folders there. Just drag them to the Trash and log out/in.

Plug-ins

Plug-in input methods are easy to install. You simply create a plain-text source file, change the file extension to either ".inputplugin" (for the Apple format) or ".cin" (a common open-source format), and then place it in the /Library/Input Methods folder.

Character Viewer

In Cocoa applications, the Character Viewer is always accessible via Edit > Special Characters... To input characters into text in an application, just double-click on the character you want.

To add or remove the scripts and other categories of characters in the list on the right side, use the "Customize List..." command in the pop-up menu on the upper left:

List

The East Asian Scripts heading contains three choices for Chinese hanzi:

  • Hanzi (Simplified) displays the GB 18030 character set by radical-stroke.
  • Hanzi (Traditional) displays the Big-5 character set by radical-stroke.
  • Han Characters - All displays all of Unicode's CJK Unified Ideographs, Extension A, and Extension B, together by radical-stroke. [Extensions C and D are not yet included here, but you can find them in the Unicode code table.]

The Code Tables heading contains tables for five encodings that include Chinese: Unicode, Big-5E, HKSCS-2001, GB2312, and GB18030. The Unicode table has a block index for Unicode 6.0. The others are strictly by code point. You can use these tables to determine if a given character is in a given character set. Select the character and switch between the tables.

SC

On the left side is the Character Info section of the Character Viewer. You can drag/copy any character from an application and drop/paste it into this section to get information about that character. This includes the input key sequences for the Apple input methods and Unicode code points. Below that is a list of Related Characters, and below that is the Font Variation section, where you can see all available glyphs for the selected character in the different fonts on your system. Click on a glyph to display it and the font's name up above:

TC

Note: You can also control-click (or right-click) on any character in the Character Viewer and select the pop-up "Copy Character Info" command to copy all of its basic information to your clipboard.

Last, but not least, there is a search box on the upper right of the viewer. Here you can search for Chinese characters using their Hanyu Pinyin readings. Chinese results are displayed in two categories, Simplified Chinese (GB 18030) and Traditional Chinese (Big-5):

Search

You can also search for Zhuyin readings, Japanese readings, Korean readings, Unicode character names, code points, and so on.

Applications

Mail 5

Automatically sets the encoding of outgoing messages based on content. If your system is set to run in English (in the Language tab of System Preferences... Language & Text), or anything other than Chinese or Japanese, the default encoding for outgoing Chinese messages is UTF-8. When the system language is set to Traditional Chinese, the default is Big Five. For Simplified Chinese it is GB 2312. For Japanese it is ISO-2022-JP.

You can manually set the encoding of an outgoing message (and subject) in Message > Text Encoding.

TextEdit 1.7

TextEdit in Lion supports vertical-text layout for Chinese and Japanese. Use the Format > Make Layout Vertical/Horizontal command (also available in the contextual menu that appears when you control-click/right-click inside a document). TextEdit will convert Chinese punctuation to/from the vertical format for you, although the effectiveness of this depends on the font you are using (some fonts are better at vertical text than others).

You can customize the pop-up menu for encodings. At the bottom of the menu is a "Customize Encodings List..." command, which brings you to a checklist of all supported encodings.

Font Book 3.0

Lion's Font Book adds a useful piece of information to the Preview > Font Info section, Glyph Count. One thing that no font manager, including Font Book, provides is detailed information about Chinese character-set coverage in a given font. For example, they don't tell you what version of Hong Kong SCS is supported. Toward that end, we provide text files containing selected Chinese character sets (hanzi only):

  • Big-5E (1998), listed by Big-5 block: [Download]
  • Hong Kong SCS 1999, 2001, 2004, 2008: [Download]
  • Unicode CJK Unified Ideographs Extension A (1999), plus six Extension B (2001) characters required for GB 18030 compliance: [Download]
  • Unicode CJK Strokes 2005, 2008: [Download]
  • Unicode CJK Unified Ideographs Extensions C (2009) and D (2010): [Download]

Just copy the text and paste it into the Preview > Custom window in Font Book.