Bug 52306 - RTF import filter in Hebrew
Summary: RTF import filter in Hebrew
Status: RESOLVED WORKSFORME
Alias: None
Product: kword
Classification: Miscellaneous
Component: filters (show other bugs)
Version: unspecified
Platform: Mandrake RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Ariya Hidayat
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-26 07:36 UTC by Yossi Natanson
Modified: 2003-01-05 19:43 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
a sample of rtf file created by kword with Hebrew (931 bytes, application/octet-stream)
2003-01-03 21:37 UTC, Yossi Natanson
Details
test.png (472 bytes, image/png)
2003-01-03 22:54 UTC, Nicolas Goutte
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yossi Natanson 2002-12-26 07:36:44 UTC
Version:            (using KDE KDE 3.0.3)
Installed from:    Mandrake RPMs
OS:          Linux

I use kword in Hebrew (righ to left language)
I save my files as .rtf (so they can be shared)
the other users (even me in WINDOW$) read them with no problem

BUT! when I try to open the file I created with KWORD in RTF format I get it reversed: a text like "CBA" (in Hebrew, of course) becomes "ABC"
Comment 1 Nicolas Goutte 2002-12-27 15:17:22 UTC
Thank you for your bug report! 
 
Could you please try to find out (with the help of MS Word) if the problems 
are more at export to RTF or at import from RTF (or perhaps even both.) 
 
KWord's RTF export filter is being rewritten for KOffice 1.3, but I suppose 
that the problem would not be fixed just by having a new filter. As far as I 
know, no KWord filter developers can write right-to-left languages, so we need 
the help of people able to do so. 
 
Have a nice day/evening/night! 
Comment 2 Yossi Natanson 2002-12-29 07:50:47 UTC
I think the problem is in the import process because reading the exported files
in M$-WORD or OpenOffice is going well...
I'll try tonight to read with KWORD RTF files created by M$-WORD and OpenOffice too.
Comment 3 Yossi Natanson 2002-12-29 19:22:00 UTC
very strange:
Importing files created by M$-WORD, OO and ABIword is OK
Importing files created by KWORD is reverse.
BUT!!
Reading files created by KWORD in M$-WORD is OK too

so, is it the import or the export or what ?

I can't figure out.... looks like that the import and the export are not consistent.

can it be something to do with encoding ?
Comment 4 Nicolas Goutte 2002-12-30 16:02:35 UTC
Subject: Re:  RTF import filter in Hebrew

Then in this case, I suppose that it is something missing at export that the 
import cannot fix.

(Later..) Good, I think I have the bug. At export, the RTL mark is wrongly 
written as \rtrmark. Can you please try to replace \rtrmark in an editor by 
\rtlmark and check if it would work?

Have a nice day/evening/night!

On Sunday 29 December 2002 19:22, Yossi Natanson wrote:
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug, or are watching someone who is.
>
> http://bugs.kde.org/show_bug.cgi?id=52306
>
>
>
>
> ------- Additional Comments From yossin@yossin.com  2002-12-29 19:22
> ------- very strange:
> Importing files created by M$-WORD, OO and ABIword is OK
> Importing files created by KWORD is reverse.
> BUT!!
> Reading files created by KWORD in M$-WORD is OK too
>
> so, is it the import or the export or what ?
>
> I can't figure out.... looks like that the import and the export are not
> consistent.
>
> can it be something to do with encoding ?

Comment 5 Nicolas Goutte 2002-12-30 16:04:16 UTC
Subject: koffice/filters/kword/rtf

CVS commit by goutte: 

Fix typo in \rtlmark (was \rtrmark)

(Let see if it was the only problem!)
CCMAIL:52306@bugs.kde.org


  M +2 -2      export/ExportFilter.cc   2.37
  M +1 -1      oldexport/rtfexport.cc   1.2


--- koffice/filters/kword/rtf/export/ExportFilter.cc  #2.36:2.37
@@ -837,5 +837,5 @@ QString RTFWorker::escapeRtfText ( const
         else if ( ch == 0x200d ) escapedText += "\\zwj ";
         else if ( ch == 0x200e ) escapedText += "\\ltrmark ";
-        else if ( ch == 0x200f ) escapedText += "\\rtrmark ";
+        else if ( ch == 0x200f ) escapedText += "\\rtlmark ";
         else if ( ch == 0x2013 ) escapedText += "\\endash ";
         else if ( ch == 0x2014 ) escapedText += "\\emdash ";

--- koffice/filters/kword/rtf/oldexport/rtfexport.cc  #1.1:1.2
@@ -844,5 +844,5 @@ QString encodeSevenBit ( QString text )
       else if ( ch == 0x200d ) escapedText += "\\zwj ";
       else if ( ch == 0x200e ) escapedText += "\\ltrmark ";
-      else if ( ch == 0x200f ) escapedText += "\\rtrmark ";
+      else if ( ch == 0x200f ) escapedText += "\\rtlmark ";
       else if ( ch == 0x2013 ) escapedText += "\\endash ";
       else if ( ch == 0x2014 ) escapedText += "\\emdash ";


Comment 6 Yossi Natanson 2002-12-30 16:12:31 UTC
what ????
can you translate it into something humans can understand ?
do you want me to do something?
Comment 7 Nicolas Goutte 2002-12-30 19:25:37 UTC
Subject: Re:  RTF import filter in Hebrew

If you mean the cvs commit (the email with CCMAIL in it), it is just for 
tracking the changes in KDE Bugs.

What I had asked you in the previous message (perhaps you got it later), was 
to use an editor (for example Kate) to replace \rtrmark by \rtlmark in a RTF 
file exported from KWord and see if it would fix the problem. (It is a 
problem, but perhaps not the only one.)

Have a nice day/evening/night!

On Monday 30 December 2002 16:12, Yossi Natanson wrote:
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug, or are watching someone who is.
>
> http://bugs.kde.org/show_bug.cgi?id=52306
>
>
>
>
> ------- Additional Comments From yossin@yossin.com  2002-12-30 16:12
> ------- what ????
> can you translate it into something humans can understand ?
> do you want me to do something?

Comment 8 Yossi Natanson 2002-12-30 22:04:44 UTC
please forgive me, but I'm old and stupid
can you explain your suggestion ?
I don't have a file called rtlmark

what file should I edit ?
what exactly do I have to replace there ?

thanks
Comment 9 Nicolas Goutte 2002-12-30 22:40:50 UTC
Subject: Re:  RTF import filter in Hebrew

You should edit a RTF file generated by KWord and replace each occurence of 
\rtrmark by \rtlmark (if there is not any, then we have another problem.)

RTF files are text files, so you cn load them in an editor (like Kate), do the 
replacement and save it back.

Then you can check if the modified file loads correctly in KWord or not. If it 
would not work, then there would be an additional bug somewhere else.

(As you have not compiled KOffice yourself, you cannot change the behaviour of 
KOffice itself.)

Have a nice day/evening/night!

On Monday 30 December 2002 22:04, Yossi Natanson wrote:
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug, or are watching someone who is.
>
> http://bugs.kde.org/show_bug.cgi?id=52306
>
>
>
>
> ------- Additional Comments From yossin@yossin.com  2002-12-30 22:04
> ------- please forgive me, but I'm old and stupid
> can you explain your suggestion ?
> I don't have a file called rtlmark
>
> what file should I edit ?
> what exactly do I have to replace there ?
>
> thanks

Comment 10 Yossi Natanson 2003-01-03 21:37:47 UTC
Created attachment 692 [details]
a sample of rtf file created by kword with Hebrew

sorry for the delay, but no \rtrmark in the file....
what now?
Comment 11 Nicolas Goutte 2003-01-03 22:54:08 UTC
Subject: Re:  RTF import filter in Hebrew

I have loaded your file into the developement version of KWord and obtained 
the attached file. Is it in the right direction or not?

I got the same result in KWord 1.2, except the known bug that at import the 
character following a Unicode character is eaten (this bug has been fixed for 
KWord 1.2.1.)

Have a nice day/evening/night!

On Friday 03 January 2003 21:37, Yossi Natanson wrote:
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug, or are watching someone who is.
>
> http://bugs.kde.org/show_bug.cgi?id=52306
>
>
>
>
> ------- Additional Comments From yossin@yossin.com  2003-01-03 21:37
> ------- Created an attachment (id=692)
>  --> (http://bugs.kde.org/attachment.cgi?id=692&action=view)
> a sample of rtf file created by kword with Hebrew
>
> sorry for the delay, but no \rtrmark in the file....
> what now?


Created an attachment (id=693)
test.png
Comment 12 Yossi Natanson 2003-01-03 23:29:46 UTC
yes, it looks OK in your JPG file
Comment 13 Yossi Natanson 2003-01-05 18:06:28 UTC
interestingly, with kword 1.21 there is no problem with the Hebrew (I found
another problem and reported it)
Comment 14 Nicolas Goutte 2003-01-05 19:43:42 UTC
If it works with KWord 1.2.1, then it was probably a bug in KWord itself.  
  
So I am changing the status of the bug to "works for me". 
 
Have a nice day/evening/night!