QScintilla/Exporters/ExporterRTF.py

changeset 1590
823a26f767cb
parent 1509
c0b5e693b0eb
child 2302
f29e9405c851
--- a/QScintilla/Exporters/ExporterRTF.py	Mon Jan 30 18:53:11 2012 +0100
+++ b/QScintilla/Exporters/ExporterRTF.py	Sat Feb 04 17:43:50 2012 +0100
@@ -30,7 +30,7 @@
     RTF_HEADEROPEN = "{\\rtf1\\ansi\\deff0\\deftab720"
     RTF_HEADERCLOSE = "\n"
     RTF_FONTDEFOPEN = "{\\fonttbl"
-    RTF_FONTDEF = "{\\f{0:d}\\fnil\\fcharset{1:d} {2};}"
+    RTF_FONTDEF = "{{\\f{0:d}\\fnil\\fcharset{1:d} {2};}}"
     RTF_FONTDEFCLOSE = "}"
     RTF_COLORDEFOPEN = "{\\colortbl"
     RTF_COLORDEF = "\\red{0:d}\\green{1:d}\\blue{2:d};"
@@ -51,7 +51,7 @@
     RTF_ITALIC_ON = "\\i"
     RTF_ITALIC_OFF = "\\i0"
 
-    RTF_EOLN = "\\par\n"
+    RTF_EOLN = "\\line\n"
     RTF_TAB = "\\tab "
 
     RTF_COLOR = "#000000"
@@ -330,7 +330,7 @@
                             f.write(ch.decode())
                     
                     column += 1
-                    prevCR = ch == '\r'
+                    prevCR = ch == b'\r'
                     pos += 1
                 
                 f.write(self.RTF_BODYCLOSE)

eric ide

mercurial