From 2784e1c75f57fbdade8e834aa422eb4443d35108 Mon Sep 17 00:00:00 2001 From: johnykvsky Date: Fri, 20 Nov 2020 21:51:49 +0100 Subject: [PATCH] fixed hypen issue --- __main__.py | 2 +- lib/epubqfix.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) mode change 100755 => 100644 lib/epubqfix.py diff --git a/__main__.py b/__main__.py index 8c5c4cb..933d34c 100755 --- a/__main__.py +++ b/__main__.py @@ -10,7 +10,7 @@ __license__ = 'GNU Affero GPL v3' __copyright__ = '2014, Robert Błaut listy@blaut.biz' __appname__ = 'epubQTools' -numeric_version = (0, 8) +numeric_version = (0, 9) __version__ = '.'.join(map(str, numeric_version)) __author__ = 'Robert Błaut ' diff --git a/lib/epubqfix.py b/lib/epubqfix.py old mode 100755 new mode 100644 index ec43366..8c794c7 --- a/lib/epubqfix.py +++ b/lib/epubqfix.py @@ -51,7 +51,7 @@ )) MY_LANGUAGE = 'pl' MY_LANGUAGE2 = 'pl-PL' -HYPHEN_MARK = '\\u00AD' +HYPHEN_MARK = '\u00AD' HOME = os.path.expanduser("~") DTD = ('', ''), - parser=etree.XMLParser(recover=False) + parser=etree.XMLParser(recover=False, encoding='utf-8') ) except: print('* File skipped: ' + os.path.basename(xhfile) + @@ -1713,7 +1713,7 @@ def process_epub(_tempdir, _replacefonts, _resetmargins, except OSError: pass - parser = etree.XMLParser(remove_blank_text=True) + parser = etree.XMLParser(remove_blank_text=True, encoding='utf-8') try: opftree = etree.parse(opf_file_path_abs, parser) except (etree.XMLSyntaxError, IOError) as e: