Re: Bug #569 (RTF export and diacritics)


Subject: Re: Bug #569 (RTF export and diacritics)
From: Hisham Muhammad (hisham@apple2.com)
Date: Wed May 03 2000 - 21:26:46 CDT


> Here is a patch for bug #569.
>
> Basically, non ASCII chars were added using _rtf_nonascii_hex2() which
sets
> m_bLastWasKeyword to UT_TRUE.
> But when m_bLastWasKeyword is TRUE, _rtf_chardata() adds a " " after which
> is wrong.

Hello to all,

I was about to send a similar patch, which was basically the same, but, I
did simply change m_bLastWasKeyword from _rtf_keyword_hex2() to UT_FALSE...
wouldn't it be a simpler solution since that function is only used for
accented characters, anyway?

In addition, a routine in ie_imp_RTF.cpp has a similar bug, which caused it
to import properly RTFs generated by AbiWord (which contained the export
bug), and consumed a space when it appeared after an accented character in
'normal' RTFs.
My solution was simply to remove the following code, at line 303, appearing
right after m_currentRTFState.m_internalState = RTFStateStore::risNorm;

      if (ok) // skip following space if applicable
       unsigned char ch;
       if (!ReadCharFromFile(&ch))
        ok = UT_FALSE;
       else if (ch != ' ')
        SkipBackChar(ch);
      }

(sorry for not sending a proper diff -- will do next time). Judging by the
comment, I don't know when the author considered "applicable" to skip a
space... maybe he was testing the import routine with RTFs exported by
AbiWord itself?

Hisham H. Muhammad
hisham@apple2.com - http://fly.to/lode



This archive was generated by hypermail 2b25 : Wed May 03 2000 - 21:29:23 CDT