Subject: Re: Bug #569 (RTF export and diacritics)
From: Hubert Figuiere (email@example.com)
Date: Thu May 04 2000 - 16:09:03 CDT
According to Hisham Muhammad <firstname.lastname@example.org>:
> 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?
rtf_keyword_hex2 is to output a control keyword. Here, we output a control
> 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 != ' ')
> (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?
This is misinterpretation of the file format: \'e8 for example is NOT a
control word but rather control symbol. Control word are delimited by a
space (and thus should be ignored), but control symbols (a \ followed by a
non alphabetic char) are not delimited by a space and thus the space should
NOT be ignored. I will have a look to see if this has some impact over the
rest of the RTF parser (since I'm not the author, I need to dig a little bit
This archive was generated by hypermail 2b25 : Fri May 05 2000 - 01:22:34 CDT