diff --git a/ebooklib/epub.py b/ebooklib/epub.py index 34167cc..4229a9e 100644 --- a/ebooklib/epub.py +++ b/ebooklib/epub.py @@ -22,6 +22,8 @@ import posixpath as zip_path import os.path from collections import OrderedDict +import unicodedata +import urllib try: from urllib.parse import unquote @@ -1416,7 +1418,9 @@ def load(self): def read_file(self, name): # Raises KeyError name = zip_path.normpath(name) - return self.zf.read(name) + parsed_name = urllib.parse.unquote(name) + normalized_name = unicodedata.normalize('NFC', parsed_name) + return self.zf.read(normalized_name) def _load_container(self): meta_inf = self.read_file('META-INF/container.xml')