RTF Input: Fix bug preventing it from running. RTF Output: produce files that can be read by RTF input.

This commit is contained in:
John Schember 2009-05-28 08:12:50 -04:00
parent 3d4ae1920a
commit 1c2f1b0f00
2 changed files with 2 additions and 2 deletions

View File

@ -70,7 +70,7 @@ class RTFInput(InputFormatPlugin):
self.log = log
self.log('Converting RTF to XML...')
try:
xml = self.generate_xml(stream)
xml = self.generate_xml(stream.name)
except RtfInvalidCodeException:
raise ValueError(_('This RTF file has a feature calibre does not '
'support. Convert it to HTML first and then try it.'))

View File

@ -30,7 +30,7 @@ class RTFOutput(OutputFormatPlugin):
out_stream.seek(0)
out_stream.truncate()
out_stream.write(content.encode('cp1252', 'replace'))
out_stream.write(content.encode('ascii', 'replace'))
if close:
out_stream.close()