emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Trouble with input methods on w32


From: Herbert Euler
Subject: Trouble with input methods on w32
Date: Wed, 21 May 2008 15:17:10 +0800


I notice that the new Emacs I built from trunk yesterday has a problem
with input methods.  The last time I built Emacs was Oct 19, 2007, and
the result binary does not have the problem.  I don't have any version
between these two versions, so I can't tell when it was introduced.

I have many IMs on my system.  Each IM is in fact an automaton.  It
reads a sequence of ASCII characters and transforms its states from
its start state into a final accepted state according to the sequence
of ASCII characters.  The final state corresponds to one or more
results defined by the IM, each of which is either a single character
or several characters forming a phrase, and is what can be inputed
with the sequence of ASCII characters in the IM.  For instance, in the
wubi input method for Chinese, the key sequence "a SPC" corresponds to
the Chinese character "工" (literally means "work"), and the key
sequence "aawt" corresponds to the Chinese phrase "工作" (literally
means "work" too).  I will call the sequence of ASCII characters
defined by the IM a *unit*, as it represents a complete input
behavior, and a change to the sequence of ASCII characters will change
the results from the IM.  I.e. a unit is not changeable.  I will call
the results defined by the IM for a unit a *unit* too.  For example,
both "a SPC" and "工" are a unit, both "aawt" and "工作" are another
unit.

The problem I have in Emacs with input methods is that, sometimes I
can't input characters or phrases by typing units.  Emacs reacts
differently for different input methods, though.

With the wubi input method, for example, after enabling it, I can
input as many as wide punctuations, but only one unit of Chinese
character(s), i.e. the first one.  After that, I can input only wide
punctuations with the IM.  Below is an illusion (where | means the
cursor position):

|               (0: the empty line)
工|              (1: type "a SPC")
工|              (2: type "a SPC", expected "工工", but nothing is inputed)
工|              (3: type "a SPC", nothing is inputed again)
工,|             (4: type ",", a wide comma is inputed)
工,,|            (5: type "," again)
工,,|            (6: type "a SPC", nothing is inputed)

Step 2, 3, and 6 are where the problem reveals.

With the MS pinyin input method, the situation is a bit different.
After enabling it, I can input as many as Chinese characters.  After a
wide punctuation is inputed with the IM, the first attempt of inputing
with the IM will always fail: If Chinese characters are going to be
inputed, it will not be inputed, and a next attempt will succeed.  If
wide punctuation is going to be inputed, it will not be inputed, and
the next attempts will all fail until an attempt of inputing
non-punctuation characters.  That attempt will be the last failed
attempt in this iteration.  The next attempt will succeed.  Here is
the illusion:

|               (0:  the empty line)
工|              (1:  input a Chinese character)
工工|             (2:  input another Chinese character)
工工,|            (3:  input a wide comma)
工工,|            (4:  the attempt of input a Chinese character after
                     inputing a wide punctuation fails)
工工,工|   (5:  the next attempt succeed)
工工,工,|  (6:  input another wide comma)
工工,工,|  (7:  the attempt of inputing a wide comma after
                     inputing a wide punctuation fails)
工工,工,|  (8:  another attempt fails)
工工,工,|  (9:  the attempts keep failing
工工,工,|  (10: until an attempt of inputing a Chinese character,
                     but this will fail too, although it is the last
                     one in this iteration)
工工,工,工| (11: the next attempt succeed, either for a Chinese
                     character or a wide punctuation)
                (12: Now the loop restarts)

Step 4, 7, 8, 9, 10 are where the problem reveals.

Regards,
Guanpeng Xu
_________________________________________________________________
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline

reply via email to

[Prev in Thread] Current Thread [Next in Thread]