Re: Re[2]: CJK patch test error report!


Subject: Re: Re[2]: CJK patch test error report!
From: Vlad Harchev (hvv@hippo.ru)
Date: Tue Oct 31 2000 - 03:08:02 CST


On Tue, 31 Oct 2000, hashao wrote:

> Hello Belcon,
>
> On Tuesday, October 31, 2000, Belcon wrote:
>
> >> Do you have any ideas why it's impossible to input anything into AW with
> >> my patch? It has exactly the same logic as HJ's patch with respect to
> >> keyboard input. May be it it's also due to the fact that HJ's version of gtk
> >> was also hacked in this respect?
>
> B> No,I don't think so.I can input Chinese in AbiWord-0.7.10 patched with
> B> HJ's
> B> patch,although I don't know why I can't input Chinese in AbiWord-0.7.11.
> B> I am still trying to find the reason.
>
> I was thinking at the line:
> + if(charData>0xff)
> + result = m_pEEM->Keystroke(EV_EKP_PRESS|state|'a',&pEM);
> + else
> + result = m_pEEM->Keystroke(EV_EKP_PRESS|state|charData,&pEM);
>
> Maybe the (charData>0xff) should be something like
> ((charData>0xff) || (charData==0)). According Xlib manual
> 13.5.10, if a input is completed in XIM, keycode will be
> set to 0. I don't know what does the 0xff means in the
> original patch. Maybe something for non-standard input
> method other than XIM?

 Hmm, wise idea. charData>0xff is there because AW uses tables with 256
elements to represent actions when some key is pressed (e.g. element
with index 'a' is callback and data what will happen when 'a' is pressed).
The index > 0xff will violate some assert.
 Though original HJ's patch also has (charData>0xff), not ((charData>0xff) ||
(charData==0)).
 But Belcon, could you please to replace (charData>0xff) with
((charData>0xff) || (charData==0)) and report results?

> But since the patch works for 0.7.10, maybe the problem
> is in somewhere else. Does the Keystroke changed lately?

 I don't think so.
 
> BTW, according to
> http://developer.gnome.org/doc/API/gdk/gdk-event-structures.html#GDKEVENTKEY
> + char *mbs=e->string;
> + int mLength=strlen(mbs);
> can be replaced by mLength=e->length; :)

 Sure :)
 
> >> Or may be Input Methods should be setup on the frame?
> >>
>
> frame already setup the XIM at the initializing stage. I just
> assume it is correctly setup.

 Hmm, you saw this initialization in sources? HJ's patch didn't contain any
initialization of IM. I assumed that GDK installs IMs for all windows that are
created by it. (Another possibility - is that IM is not installed on
GtkDrawingArea but only on widgets like GtkEntry - so we actually need to
install IM on frame). Please anybody who knows tell what's going on.

> >> Also, just curios, my RH6.0's glibc knows among others 3 encodings:
> >> ISO-2022-JP-2, ISO-2022-JP, ISO-2022-KR
> >> are they just synonims or they are different?
>
> I don't know much about Japanese charset but apparently the
> 3rd one is a locale for Korean.

  Thank you for your thoughts. Your help is very appreciated.

> --
> Best regards,
> hashao mailto:hashao@china.com.n.s.pam

 Best regards,
  -Vlad



This archive was generated by hypermail 2b25 : Tue Oct 31 2000 - 03:26:25 CST