RTF import


Subject: RTF import
From: Hisham Muhammad (hisham@apple2.com)
Date: Sun Jun 11 2000 - 14:33:20 CDT


Earlier this week I downloaded a nightly build from Sam's page and
noticed
that the RTF importing still has the same problem the exporter had (the
exporter is already fixed).

1) Write something with an accented word followed by a space, such as

Isto é estranho

2) save as RTF and open it. It will appear as

Isto éestranho

A while ago I sent a quick fix for RTF import and export but Hubert had
a more elegant (and from what I checked, more correct) solution to the
bug so my changes were not committed -- but from what I remember RTF
import was not addressed in Hubert's patch, so the bug persisted. From
what I see, in the file
ie_imp_RTF.cpp, it's simply a matter of removing this piece of code, in
the method IE_Imp_RTF::_parseFile(FILE * fp) ...

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

I can't see a situation where this behavior (skipping the space) is
desired. My sources are a bit outdated, but here it's in the line 292.

Hisham



This archive was generated by hypermail 2b25 : Sun Jun 11 2000 - 14:34:45 CDT