On Thu, Nov 09, 2000 at 04:46:06AM -0600, [EMAIL PROTECTED] wrote:
> On Thu, Nov 09, 2000 at 06:37:59PM +0800, ha shao wrote:
> > On Thu, Nov 09, 2000 at 06:27:05PM +0800, [EMAIL PROTECTED] 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.



Reply via email to