mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-02 03:13:14 +02:00
RTF Input: Fix bug preventing it from running. RTF Output: produce files that can be read by RTF input.
This commit is contained in:
parent
3d4ae1920a
commit
1c2f1b0f00
2 changed files with 2 additions and 2 deletions
|
|
@ -70,7 +70,7 @@ def convert(self, stream, options, file_ext, log,
|
|||
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.'))
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ def convert(self, oeb_book, output_path, input_plugin, opts, log):
|
|||
|
||||
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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue