Re: request for help from CJK hackers


Subject: Re: request for help from CJK hackers
From: Belcon Zhao (belcon@hotmail.com)
Date: Thu Nov 09 2000 - 01:56:49 CST


Hello Vlad,abi-dev:

>From: Vlad Harchev <hvv@hippo.ru>
>To: Belcon Zhao <belcon@hotmail.com>
>CC: abiword-dev@abisource.com
>Subject: Re: request for help from CJK hackers
>Date: Thu, 9 Nov 2000 10:12:12 +0400 (SAMT)
>
>On Thu, 9 Nov 2000, Belcon Zhao wrote:
>
> Hello Belcon,
>
[...]
> > But here still has a question that I report to you yesterday,that is
> > the sequence of English Characters and Chinese Characters.I am debugging
> > now.If I have result,I will report to you.
>
> Here is an explicit description of the problem:
>
> when sequence "AbiWord**" (where ** are Chinese chars) is cut and then
>pasted, it's pasted as "**AbiWord" - i.e. Chinese chars are moved in front
>of
>english. I don't know whether chinese chars gets reversed.

And I found that if sequence is "AbiWord**##&&(here ## && are Chinese
chars too),I can't guess what's the sequence after cut&paste.Maybe
the string know the regular.:-) As I test,I select the whole string
"AbiWord**##&&".After copy&paste,it became **AbiWord##&&".Then,I
select "**AbiWord##&&",after same operation,I got "**##&&AbiWord".
Here,all Chinese chars stand ahead of English Chars.:-( I don't know
why.Maybe someone else who is familair with pieceTable know what
happened when copy operation excutes?

>
> My questions:
>* Does CJK chars gets reversed (i.e. was ABCD and becomes DCBA ?) or they
>are
>just positioned after English chars in original order?

English chars get good sequence.If we ignore English chars,CJK chars
have good sequence too.I mean,if string is ABCDEF (Here ABCDEF stand
for six Chinese chars),their sequence is always ABCDEF after
copy&paste although between or after them there is English chars.

>* Save file as .rtf - do CJK chars get moved in it?

Yes,CJK chars get moved.:-(

>* Manually save the same file as .txt and as .abw - is there the same
>problem
> with CJK chars?

As I expect,.txt and .abw file are fine.Their sequence is good.

>* Also save as html, latex - is there the same problem with CJK chars
>

Html file works fine.When I save .abw file as latex file,AW crashed.
I almost know nothing about latex,so I ignore the message.If you are
interested in this bug,I will test again and send the message to you.

> If CJK chars are moved if saved in any file formats, then it's a problem
>with
>AW core. I don't have any ideas what can be causing it.
> If not - then I hope someone has a clue on the reasons for this funny
>behaviour.

Then,do anyone else can teach me how to show the string which hide
in pDocRange of AP_UnixApp::copyToClipboard(PD_DocumentRange *
pDocRange) of ap_UnixApp.cpp."copyToClipboard" exec this:
***pExpRtf->copyToBuffer(pDocRange,&bufRTF);***
So,I put a debugmsg instruction in
IE_Exp::copyToBuffer(PD_DocumentRange * pDocRange, UT_ByteBuf * pBuf).
Here is the debug instruction:
UT_DEBUGMSG(("Belcon:in
IE_Exp::copyToBuffer,pBuf=%s\n",pBuf->getPointer(0)));
But I only got "pBuf=(null)".
I am not familar with these function.So,would someone else be kind
enough to show me how to output the string which I have selected
and which is copied to clipboard?

I sorry for my English.I am afraid that what I said will confuse you
all.But I am really need you help to solve the last problem of AW
CJK version.

>
> >
> > >
> > >Also, please test (and fix :) the following:
> > >* cutting from AW and pasting to other apps
> > >* pasting to AW from other apps
>
> Do these things work fine?
>

These works find.

>[...]
> > BTW: CJK's font is not Type1 font.It is Truetype Font.So AW of CJK
>version
> > depends on what Truetype fonts you have installed in your
> > system.
> > Should we add a function to install Truetype Font in AW
>automatically?Just
> > my opinion.
>
> Hmm, I don't understand you - what do you mean by "install
>automatically"?

Sorry.I mean that we can add a menu item to AW.This menu can
popup a widget which contains a list and something else.In this
list,there is all Truetype Font that your system have installed.
you can choose which font or all font to be installed into AW.
Then AW can generate some fonts.dir files according the fonts'
encoding method in different subdirectories.
  You know that we can't guess what Truetype font that user has
installed,so we have to generate special fonts.dir(like
GB2312/fonts.dir or Big5/fonts.dir) when user use AW.

> I assume you propose to ship subdirectories with CJK fonts.dir with AW -
>right? If everything that is required for Chinese (and probably
>all CJK fonts) is subdirectory with fonts.dir in it, these directories
>could
>be added to AW distribution. So I agree with this.

No,I don't mean this.The reason is above.

> Then prepare fonts.dir for GB2312 and Big5 you think should be in AW
>distribution and post a patch that will add them (or better - discuss
>directory name with me and then post a patch).
> I will post a proposal for including CJK fonts.dir with AW later today to
>the
>list explicitly.
>
> Thanks!
>
> > Best regards!
> > -Belcon
> >
>_________________________________________________________________________
> > Get Your Private, Free E-mail from MSN Hotmail at
>http://www.hotmail.com.
> >
> > Share information about yourself, create your own public profile at
> > http://profiles.msn.com.
> >
>
> Best regards,
> -Vlad
>

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at
http://profiles.msn.com.



This archive was generated by hypermail 2b25 : Thu Nov 09 2000 - 01:56:54 CST