Newsgroups: comp.os.linux.misc Date: 31 Jan 2004 12:49:35 -0800
Sun Tong, thank you for your reply…
Tong * wrote in message:
> Now, I just found that Emacs under RH9 can accept XIM input right away. So > I don't need to learn the cumbersome built-in GB input method > any more. Just start my miniChinput type right in Hanyu Pinyin.
Do some native speakers prefer to use some other methods perhaps or is Hanyu Pinyin the most common input method among most native speakers as well? AFAIK GB (Guojia Biaozhun) and Big5 are character sets both of which have been superseded by Unicode. But you are talking about input methods? How do the GB and Big5 input methods work, if different from Hanyu Pinyin? I would have expected that Big5 has at least one other input method, since the Cantonese pronounciation is very different from the Mandarin pronounciation, but most Chinese people speak Mandarin so perhaps Cantonese speakers will still not mind if they have to use Hanyu Pinyin. Are there other forms of Pinyin or other input methods preferred by Cantonese, Taiwanese, or Mandarin speakers?
> I've been always using miniChinput, maybe since RH7.2. Very simple, switch > system language into GB Chinese, fire up emacs, or gnome-terminal, or > gedit, or mozilla, then Ctr-Space and off you go!
I tried this. It seems to work very nicely. I simply logged in with the default language settings into Fedora Core 1 Linux and issued the following commands:
$ export LANG=zh_CN.UTF-8 $ export XMODIFIERS=@im=Chinput $ /usr/bin/chinput Chinput Version 3.0.2 -- XIM Server Distributed under the terms of the GNU General Public License (GPL) Following charsets: 0: -Sony-Fixed-Medium-R-Normal--16-120-100-100-C-80-ISO8859-1 1: -Sony-Fixed-Medium-R-Normal--16-120-100-100-C-80-ISO8859-1 2: -isas-fangsong ti-medium-r-normal--0-0-0-0-c-0-gb2312.1980-0 3: -jis-fixed-medium-r-normal--0-0-0-0-c-0-jisx0208.1983-0 4: -baekmuk-batangbdf-bold-r-normal--0-0-0-0-m-0-ksc5601.1987-0 5: -taipei-fixed-medium-r-normal--0-0-0-0-c-0-big5-0 6: -arabic-newspaper-medium-r-normal--0-0-0-0-p-0-iso10646-1 /home/nzanella/.pyinput/usrphrase.tab is not a valid pinyin phrase file. Chinput ................................................[OK]
and then, just as you mentioned, I can start up an application from the same window so that the child application will inherit the parent application's state including environment variables.
I am not sure what the complaint about the invalid pinyin phrase file is all about, but I just deleted that file and the complaint went away. Any ideas?
> You should be able to see an Chinese input box, type in "nihao"!
Cool! I type CTRL-SPACE to turn Chinese input on in the child process, then type ni, and press 1 to select the character corresponding to the word you, then type hao and press 1 to select the character corresponding to the word good, and then I can press CTRL-SPACE again to switch back to English.
I notice that miniChinput does not come with a man page. Basically I was just wondering whether there is some way to stop the server sometime after it is started.
I also find that the server is activated globally, not only for the children of the window from which it is launched. This is true so long as the LANG and XMODIFIERS environment variables are set correctly. So for instance after doing what I describe I can also open up a new gnome-terminal from a popup menu and manually set:
$ export LANG=zh_CN.UTF-8 $ export XMODIFIERS=@im=Chinput
and then launch gvim. After pressing the i key in gvim to enter insert mode I can then do the same trick: I press CTRL-SPACE to toggle chinese input and off I go. For some reason I was not able to get this to work from console mode vim so I am not sure if this is also possible or not. Has anyone been able to get this to work as well?
Thanks a lot!!!
Neil