Re: Patch: Fix for Bug 1164, 2nd try


Subject: Re: Patch: Fix for Bug 1164, 2nd try
From: Vlad Harchev (hvv@hippo.ru)
Date: Tue May 22 2001 - 11:45:37 CDT


On Tue, 22 May 2001, Andrew Dunbar wrote:

> Vlad Harchev wrote:
> >
> > > >
> > > > 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?
> > >
> > > It has changed. See above.
> > > Committer is dom on May 3 (revision 1.58). Dom, can you explain what it is for ?
> >
> > Thank you for research. That added chunk:
> > else
> > m_mbtowc.initialize();
> > should be definitely removed.
>
> I'm not an iconv expert but I thought we needed something like
> that to reset the internal state after trying and failing to
> convert a character. Something *like* that - but not exactly that...

 MbToWc just something like this - if it can't convert character because the
sequence aggregated so far would be invalid, it resets state and cleans the
buffer - buf it the sequence looks OK and it's just too short, state is not
reset. So, there is no need for "else" branch.

 Best regards,
  -Vlad



This archive was generated by hypermail 2b25 : Sat May 26 2001 - 03:51:06 CDT