On Tue, May 22, 2001 at 12:52:30PM +0500, [EMAIL PROTECTED] wrote:
> On Tue, 22 May 2001, ha shao wrote:
> The code in AW 0.7.14 is
> if (no_convert==0 && ch<=0xff)
> {
> wchar_t wc;
> if (m_mbtowc.mbtowc(wc,(UT_Byte)ch))
> return AddChar(wc);
> } else
> return AddChar(ch);
>
> I don't see how 'else' can reset buffer (AddChar(ch) doesn't reset it
> either). Or did RTF importer change there since 0.7.14?
>
Yes, the current cvs read:
=================================================================
if (no_convert==0 && ch<=0xff)
{
wchar_t wc;
// TODO Doesn't handle multibyte encodings (
CJK)
if (m_mbtowc.mbtowc(wc,(UT_Byte)ch))
return AddChar(wc);
else
m_mbtowc.initialize();
} else
return AddChar(ch);
}
==================================================================
> > Beside, since the AddChar(ch) does not actually insert the
> > character into the document (as suggested in its definition),
> > can we just add the mb into a buffer and call m_mbtowc.mbtowc()
> > at the beginning of FlushStoredChars?
>
> I think it would be troublesome. Is there are any reasons why the way you
> propose may be better than current implementation (besides performance)?
>
yes, performance, and maybe safer. anyway, it is a mirror point.
--
Best regard
hashao
- Re: Patch: Fix for Bug 1164, 2nd try Dom Lachowicz
- Re: Patch: Fix for Bug 1164, 2nd try Hubert Figuiere
- Re: Patch: Fix for Bug 1164, 2nd try ha shao
- Re: Patch: Fix for Bug 1164, 2nd try Vlad Harchev
- Re: Patch: Fix for Bug 1164, 2nd try ha shao
- Re: Patch: Fix for Bug 1164, 2nd try Vlad Harchev
- Re: Patch: Fix for Bug 1164, 2nd try Vlad Harchev
- Re: Patch: Fix for Bug 1164, 2nd try Dom Lachowicz
- Re: Patch: Fix for Bug 1164, 2nd try Hubert Figuiere
- Re: Patch: Fix for Bug 1164, 2nd try Vlad Harchev
- Re: Patch: Fix for Bug 1164, 2nd try ha shao
- Re: Patch: Fix for Bug 1164, 2nd try Vlad Harchev
- Re: Patch: Fix for Bug 1164, 2nd try ha shao
- Re: Patch: Fix for Bug 1164, 2nd try Vlad Harchev
- Re: Patch: Fix for Bug 1164, 2nd try ha shao
- Re: Patch: Fix for Bug 1164, 2nd try Andrew Dunbar
- Re: Patch: Fix for Bug 1164, 2nd try ha shao
- Re: Patch: Fix for Bug 1164, 2nd try Vlad Harchev
- Re: Patch: Fix for Bug 1164, 2nd try Andrew Dunbar
- Re: Patch: Fix for Bug 1164, 2nd try Vlad Harchev
- Re: Patch: Fix for Bug 1164, 2nd try Andrew Dunbar
