Learning Chinese - How To Write Tones in Pinyin on OpenSolaris
By Petr Hruska on Sep 22, 2008
More and More people are learning Chinese nowadays and one of the most popular and used latin transcript is Pinyin. As Chinese is a tone language, tones are written above syllables using different "marks" :
1. First tone: " ¯ " (bāo)
2. Second tone: " ´ " (báo)
3. Third tone: " ˘ " (băo)
4. Fourth tone: " ` " (bào)
So how to write pinyin with all those tones marks on OpenSolaris or Solaris ? Actually almost all of them it's quite easy, well for some you might get in troubles, but Sun is working on it and hopefully full support will be available soon.Before starting writing pinyin you need to know what's compose key is. Thanks to this key you can combine vowels with required tones. On Sun hardware keyboards (and maybe on some other keyboards) there is compose key located next to AltGr, on standard PC or notebook keyboards compose key is mapped to "Menu" key, again usually located between AltGr and ctrl. So what to do (please ensure you are using utf-8 locale):
1. To input first tone use underscore char:
- <compose> + <underscore> + vowel (e.g. <compose>+<_>+<a> => ā )
2. To input second tone use aphostrophe char:
- <compose> + <aphostrophe> + vowel (e.g. <compose>+<'>+<a> => á )
3. To input third tone is currently an issue :(
- for "ŭ" use <compose> + <u> + <u>
- for "ă" use <compose> + <a> + <u>
- for "ě" use <compose> + <e> + <v>
- for "ŏ, ĭ, Ǖ,ǖ, Ǘ, ǘ, Ǚ, ǚ, Ǜ, ǜ" there is currently no compose sequence available.
To input those symbols you can use utility "gnome-character-map" (type "charmap" or "gnome-character-map" from your terminal and in "latin" script search for "ŏ" or "ĭ" etc ... Then you can copy paste them to your text.
4. To input fourth tone use grave accent char:
- <compose> + <aphostrophe> + vowel (e.g. <compose>+<`>+<a> => à )
So that's it. For those interested in some background. compose sequences are defined in:
- OpenSolaris: /usr/X11/share/X11/locale/<locale>/Compose
- Solaris: /usr/openwin/lib/locale/<locale>/Compose
Unfortunately if you want to add new sequence, manual edit is not sufficient, you need to rebuild X11 stuff (SUNWxwfnt) to make the new sequences working. For some missing characters I have submitted RFE and hopefully full support for pinyin input will be available soon.