From 5715d0fbc8999bddb99534f64c807a7b3beda95b Mon Sep 17 00:00:00 2001 From: Sengian Date: Sat, 31 Jul 2010 14:27:48 +0200 Subject: [PATCH] Fixed a regression inttroduced by patch 5798 --- src/calibre/ebooks/txt/input.py | 3 +-- src/calibre/ebooks/txt/processor.py | 12 ++++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/calibre/ebooks/txt/input.py b/src/calibre/ebooks/txt/input.py index 935a187d5d..b444bf1cf4 100644 --- a/src/calibre/ebooks/txt/input.py +++ b/src/calibre/ebooks/txt/input.py @@ -57,7 +57,6 @@ class TXTInput(InputFormatPlugin): txt = preserve_spaces(txt) txt = _ent_pat.sub(xml_entity_to_unicode, txt) - txt = txt.encode('utf-8') if options.markdown: log.debug('Running text though markdown conversion...') @@ -80,7 +79,7 @@ class TXTInput(InputFormatPlugin): base = os.path.dirname(stream.name) htmlfile = open(os.path.join(base, 'temp_calibre_txt_input_to_html.html'), 'wb') - htmlfile.write(html) #html.encode('utf-8') + htmlfile.write(html.encode('utf-8')) htmlfile.close() cwd = os.getcwdu() odi = options.debug_pipeline diff --git a/src/calibre/ebooks/txt/processor.py b/src/calibre/ebooks/txt/processor.py index 6bd635b6df..58a24f65dc 100644 --- a/src/calibre/ebooks/txt/processor.py +++ b/src/calibre/ebooks/txt/processor.py @@ -19,7 +19,7 @@ HTML_TEMPLATE = u'