Re: Adding context to GtkIMContextIM



Theppitak Karoonboonyanan <thep links nectec or th> writes:

> On Wed, Oct 24, 2001 at 08:49:13AM -0400, Owen Taylor wrote:
> > 
> > Theppitak Karoonboonyanan <thep links nectec or th> writes:
> > 
> > > However, the reconversion is useful for more sophisticated Thai XIM,
> > > where invalid sequences can be corrected, instead of just being rejected.
> > > (This is supported in most Windows Thai Editions.)
> > 
> > Can you describe how this works in detail? (From the user's point
> > of view.)
> 
> The input method must ensure that the input text is in cannonical form.
> A basic XIM just filters out key events that would create a non-cannonical
> form, without touching the text buffer.
> 
> A sophisticated XIM tries to "normalize" the order by editing the
> previous cell and managing the input char to be placed eventually.
> 
> The cannonical order for a cell is BV?T?, where B is a base char,
> V is an above/below vowel/diacritic, and T is a top tone mark/diacritic.
> 
> Suppose B = { a, b, c }, V = { p, q, r }, T = { x, y, z }
> 
>   (ap)  + x --> apx   // usual appending
>   (ap)  + q --> aq    // substitution for same class
>   (ax)  + y --> ay    // ..(ditto)..
>   (ax)  + p --> apx   // reordering
>   (apx) + y --> apy   // substitution for same class
>   (apx) + q --> aqx   // ..(ditto)..
>   (apx) + b --> apxb  // no substitution for base char, however
>   (ap)  + b --> apb   // ..(ditto)..
>   (ax)  + b --> axb   // ..(ditto)..

Hmm, you can get pretty close to this behavior by simply delaying the
commit until you get the next base character. The main problem you
would see is that you wouldn't get this behavior on editing existing
text. If I have

 apx|bqy
       
And put the cursor at the location marked with '|' and hit y,
it wouldn't do the substitution. Is it possible that Windows is
just doing this?

Regards,
                                        Owen

   
   





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