From 388083e92f34189fd809710ca92a27d07b62b105 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 21 Nov 2014 13:28:59 +0530 Subject: [PATCH] ... --- src/calibre/gui2/tweak_book/editor/text.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/tweak_book/editor/text.py b/src/calibre/gui2/tweak_book/editor/text.py index d2be408e3a..7f90600b2f 100644 --- a/src/calibre/gui2/tweak_book/editor/text.py +++ b/src/calibre/gui2/tweak_book/editor/text.py @@ -220,7 +220,7 @@ class TextEdit(PlainTextEdit): sclass = {'html':HTMLSmarts, 'xml':HTMLSmarts, 'css':CSSSmarts}.get(syntax, None) if sclass is not None: self.smarts = sclass(self) - self.setPlainText(unicodedata.normalize('NFC', text)) + self.setPlainText(unicodedata.normalize('NFC', unicode(text))) if process_template and QPlainTextEdit.find(self, '%CURSOR%'): c = self.textCursor() c.insertText('')