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


Reply via email to