This commit is contained in:
Kovid Goyal 2014-06-22 10:26:40 +05:30
parent 466383c519
commit 41520c443d

View File

@ -145,6 +145,8 @@ class Editor(QMainWindow):
self.editor.load_text(template, syntax=self.syntax, process_template=True)
def get_raw_data(self):
# The EPUB spec requires NFC normalization, see section 1.3.6 of
# http://www.idpf.org/epub/20/spec/OPS_2.0.1_draft.htm
return unicodedata.normalize('NFC', unicode(self.editor.toPlainText()).rstrip('\0'))
def replace_data(self, raw, only_if_different=True):