Re: final bits for CJK patch


Subject: Re: final bits for CJK patch
From: Vlad Harchev (hvv@hippo.ru)
Date: Fri Nov 10 2000 - 02:19:49 CST


On Fri, 10 Nov 2000, ha shao wrote:

> On Thu, Nov 09, 2000 at 09:32:23PM +0400, hvv@hippo.ru wrote:
>[...]
> Maybe this can be changed to(are we dealing with one wc a time?):
>
> --- ie_exp_RTF_listenerWriteDoc.cpp.orig Fri Nov 10 10:04:19 2000
> +++ ie_exp_RTF_listenerWriteDoc.cpp Fri Nov 10 10:14:17 2000
> @@ -196,14 +196,21 @@
> {
> /*FIXME: can it happen that wctomb will fail under CJK locales? */
> m_wctomb.wctomb_or_fallback(mbbuf,mblen,*pData++);
> - for(int i=0;i<mblen;++i) {
> - unsigned char c = mbbuf[i];
> - if ( c > 0x007f)
> + if (mbbuf[0] > 0x007f)
> + {
> + FlushBuffer();
> + for(int i=0;i<mblen;++i) {
> + unsigned char c = mbbuf[i];
> m_pie->_rtf_nonascii_hex2(c);
> - else
> - *pBuf++ = c;
> + }
> + }
> + else
> + {
> + for(int i=0;i<mblen;++i) {
> + *pBuf++ = mbbuf[i];
> + }
> + }
>
> - };
> } else if (!m_pie->m_atticFormat)
> {
> if (*pData > 0x00ff) // emit unicode character
>

 To say the truth, I don't know CJK encodings well to be sure that it will or
will not work fine. So you decide whether it should go in CVS or not (then
post patch against "current state of CVS").

 Best regards,
  -Vlad



This archive was generated by hypermail 2b25 : Fri Nov 10 2000 - 02:40:33 CST