Re: I need some help!


Subject: Re: I need some help!
From: ha shao (hashao@china.com)
Date: Thu Nov 09 2000 - 04:51:40 CST


On Thu, Nov 09, 2000 at 04:46:06AM -0600, sam@uchicago.edu wrote:
> On Thu, Nov 09, 2000 at 06:37:59PM +0800, ha shao wrote:
> > On Thu, Nov 09, 2000 at 06:27:05PM +0800, hashao@china.com wrote:
> > >
> > > I believe it is in the file ie_exp_RTF_listenerWriteDoc.cpp,
> > > at line 201:
> > > for(int i=0;i<mblen;++i) {
> > > unsigned char c = mbbuf[i];
> > > if ( c > 0x007f)
> > > m_pie->_rtf_nonascii_hex2(c);
> > > else
> > > *pBuf++ = c;
> >
> > Make the last line as:
> > {
> > *pBuf++ = c;
> > Flushbuffer();
> > }
> >
> > Does the job for me. :)
> > Okey, lost some efficiency, maybe.
>
> Well, I'm not really sure about this, but from looking at that code, it
> would seem that *pBuf++ does not deal properly with the possibility
> of writing multiple bytes for that character. I could be totally wrong on
> this, not knowing anything about the CJK code, but it is a possibility.
>

Actually, *pBuf++ should flush before it encounters next nonascii
char. But somehow it forgot to do it and all nonascii are accomulated
until *pBuf++ finally get flushed.

yes, maybe the Flushbuffer should be put before
m_pie->_rtf_nonascii_hex2(c);

of the previous 'if' clause.



This archive was generated by hypermail 2b25 : Thu Nov 09 2000 - 04:51:52 CST