Re: CJK patch test error report!


Subject: Re: CJK patch test error report!
From: Vlad Harchev (hvv@hippo.ru)
Date: Tue Oct 31 2000 - 13:35:21 CST


On Tue, 31 Oct 2000, Belcon wrote:

 Hi,

> Vlad Harchev дµÀ¡Ã
>
> > >
> > > Vlad,I have solved this problem.Just changed a line of
> > > src/af/ev/unix/ev_UnixKeyboard.cpp
> > > Here it is:
> > > 404 if (keyval > 0x0000FFFF)
> > > 405 // return UT_TRUE; //
> > > yes, it is a virtual key.
> > > 406 return UT_FALSE;
> > > HJ's patch has changed this.Maybe you forget to change.
> > > After change the return value,I can input Chinese happily.
> > > :-)
> >
> > Hmm, it seems I forgot to include it. I'm very sorry.
> > But how do you know that you can input Ch if AW doesn't show it? :)
> > Unfortunately, my next-cjk-patch doesn't include it yet, so all CJK testers
> > will have to do it manually for now.
> >
> I make a quick fixed in drawChars.
> If(font==Chiesefont) Then text[i]-0x8080.
> So I can see Chinese.:-)

 Nice hack :)
 Also I would like you to try the latest CJK patch (it's all in one) that will
be announced shortly after this letter. It uses gdk_fontset_load instead of
gdk_font_load so your hack probably won't be needed. Could you test whether
it works?

> >
> > OK, thank you. Now I know the reason why it crashes.
> > Here is a short description:
> >
> > AW makes cut&paste using saving portiong of document to rtf and importing
> > resultant rtf to another place.
> > When saving RTF, AW allows to use encoding different from current (that is
> > important for Russian for example). The name of that encoding understood by
> > iconv is returning by
> > XAP_EncodingManager::charsetFromCodepage(lid)
> > lid is always 0x404 for chinese.
> > wvLIDToCodePageConverter(0x404) will return CP936
>
> Vlad,when I debug AW,I found that wvLIDToCodePageConverter(0x404)will
> return
> CP950,not CP936.When I changed {"CP936","GB"} to {"CP936","GB2312"},AW
> still
> crash down.But if I changed {"CP936","GB"} to {"CP950","GB"} or
> {"CP950","GB2312"}
> ,AW won't crash down,but the characters I paste are not Chinese
> characters.:-(
> Any ideas?

 Definitely, adding {"CP950","GB2312" } is a right thing. So this should be
definiely there. So you can copy Ch to clipboard :)
 As for pasting, I've changed exporter to RTF a little too . Chances are low
that it help properly importing rtf exported by AW (i.e. copying and pasting)
but I see no other flaws in exporter/importer combination. So please try it
please.

 If it doesn't work still - then save the rtf file and look at it with eyes.
 Also try saving exactly same text in GB2312 Word or other app.
 I recommend you to use some remarkable english phrases around say 2 chinese
characters (e.g. "AbiWord" )- this way you'll easily locate them with eyes.
Then compare the differences (and probably send me two pieces of text between
two english words - but try to limit it to 2 chinese characters so I will be
able to distinguish them too). Analyse. To test importing RTF (i.e. pasting)
just put a breakpoint at UT_Mbtowc::mbtowc and run importer or paste something
and watch whether things work as they should and fix them :)

> > After that the return value of wvLIDToCodePageConverter(0x404) is looked up
> > in MSCodepagename_to_charset_name_map in the xap_EncodingManager.cpp.
> > In your case it finds "GB" and uses it as the encoding name understood by
> >
> [deleted]
> >
> > Also try pasting from AW to AW. Does it work?
> >
> Many thanks to your help!
> Try pasting from AW to AW,it doesn't work if I haven't change CP936,
> after I changed CP936,it doesn't show Chinese characters.:-(

  As you've discovered, you have to add {"CP950","GB2312"} to that table.
>
> >
> > I'm sorry for my compact and may be impolite answers - I have very few time.
> > Please exuse me.
> >
>
> I think you help me so many that I don't know how to express that!

 It's a pleasure for me to help making AW be fully internationalized.

> Best regards,
> -Belcon
>

 I didn't cc to Martin and Sam and HJ this time. If you guys want to be
"subscribed" make us know :)

 PS: I will announce next incremental next-cjk-patch.diff that will include
 all the 2nd version of next-cjk-patch.diff had plus some changes made on
 your research (fix in ev_UnixKeyboard.cpp, fix for exporter to .abw and
addition of {"CP950","GB2312"} to the table of encodings. So please try it.

 At a minimum, try changes to xap_UnixFont.cpp and ie_exp_RTF*.cpp - you
didn't try them yet.
 
 Best regards,
  -Vlad



This archive was generated by hypermail 2b25 : Tue Oct 31 2000 - 14:35:32 CST