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 - 05:19:00 CST


Hello Vlad:

Yes,it works!Great work!
As chih-wei Huang metioned that there still is some bug with
Big5 Chinese.I always test AW in GB2312.I will test Big5 on
next Monday,cause I have to do something else next three days.

>From: Vlad Harchev <hvv@hippo.ru>
>To: Belcon Zhao <belcon@hotmail.com>, Belcon <rainfall@yeah.net>
>CC: abiword-dev@abisource.com
>Subject: Re: request for help from CJK hackers
>Date: Thu, 9 Nov 2000 14:24:17 +0400 (SAMT)
>
>On Thu, 9 Nov 2000, Vlad Harchev wrote:
>
> > On Thu, 9 Nov 2000, Belcon Zhao wrote:
> >
> > Hello Belcon,
> >
> > It seems I found a solution to the problem. It's my silly bug in RTF
> > exporter. I'm very sorry for it. (Though I don't have CJK locale to test
> > solution). In ie_exp_RTF_listenerWriteDoc.cpp, in function
> > s_RTF_ListenerWriteDoc::_outputData there are following strings:
> > if (c>0x007f) {
> > m_pie->_rtf_keyword("uc",0);
> > signed short si = *((signed
>short *)c);
> > m_pie->_rtf_keyword("u",si);
> >
> > } else {
> > *pBuf++ = (UT_Byte)c;
> > };
> > They should be changed to:
> > if (c>0x007f) {
> > FlushBuffer();
> > m_pie->_rtf_keyword("uc",0);
> > signed short si = *((signed
>short*)c);
> > m_pie->_rtf_keyword("u",si);
> >
> > } else {
> > *pBuf++ = (UT_Byte)c;
> > };
> > I.e. FlushBuffer(); inserted.
> > Please report whether this solves the problem.
> > If yes, then it seems AW is fully CJK-aware.
>
> Ups, my file was screwed up - that piece is absent in CVS (and it's OK -
>don't commit that branch.)
> Current file has
> m_wctomb.wctomb_or_fallback(mbbuf,mblen,*pData++);
> for(int i=0;i<mblen;++i) {
> unsigned char c = mbbuf[i];
> if ( c > 0x007f)
> m_pie->_rtf_nonascii_hex2(c);
> else
> *pBuf++ = c;
>
> };
> Should be changed to
> m_wctomb.wctomb_or_fallback(mbbuf,mblen,*pData++);
> for(int i=0;i<mblen;++i) {
> unsigned char c = mbbuf[i];
> if ( c > 0x007f) {
> FlushBuffer();
> m_pie->_rtf_nonascii_hex2(c);
> } else
> *pBuf++ = c;
> };
>
> I.e. FlushBuffer(); inserted again.
>

Thanks for your explain.And I also crashed with the code your last
letter metioned.But it works fine with above codes.:-)
Now,our work is test in Big5.I think it is a easy work.:-)

> I'm sorry for confusion.
>
> Best regards,
> -Vlad
>
>
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.



This archive was generated by hypermail 2b25 : Thu Nov 09 2000 - 05:19:21 CST