[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/filters/kword/rtf/export
From:       David Faure <faure () kde ! org>
Date:       2003-06-19 18:51:02
[Download RAW message or body]

CVS commit by faure: 

Patch by Bernd Pol, bernd.pol-at-online.de: "The OOo rtf import filter
does not interpret ASCII characters higher than 127 correctly when they
are in unicode. This patch provides them in \'xx format.".
Approved by Nicolas Goutte.


  M +9 -2      ExportFilter.cc   2.55


--- koffice/filters/kword/rtf/export/ExportFilter.cc  #2.54:2.55
@@ -829,6 +829,13 @@ QString RTFWorker::escapeRtfText ( const
             escapedText += QString::number ( ch, 16 );
         }
-        else if ( ch >= 127 ) // check for a non-ASCII character (127 is already \
non-ASCII) +        else if ( ch >= 127 && ch < 256) // check for a 8 bit non-ASCII \
character (127 is already non-ASCII)  {
+                        // bp: added for OpenOffice compatibility
+                        escapedText += "\\\'";
+            escapedText += QString::number ( ch, 16 );
+        }
+        else if ( ch >= 256) // check for a higher code non-ASCII character
+        {
+                        // encode this as decimal unicode
             escapedText += "\\u";
             escapedText += QString::number ( ch, 10 );


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic