aboutsummaryrefslogtreecommitdiffstats
path: root/epy.py
diff options
context:
space:
mode:
authorbenadha <benawiadha@gmail.com>2022-01-16 11:51:36 +0700
committerbenadha <benawiadha@gmail.com>2022-01-16 11:51:36 +0700
commit68c3dd120a50ef38f4fca563bdc96674b0c8435a (patch)
tree699d4509bd5fa792e7fe32a5a4236a3c33be677f /epy.py
parent363eaecdfaaf28ae6f98effdea8287313a530ab7 (diff)
downloadepy-68c3dd120a50ef38f4fca563bdc96674b0c8435a.tar.gz
Fixed mobi encoding issue on Windows
Diffstat (limited to 'epy.py')
-rwxr-xr-xepy.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/epy.py b/epy.py
index 53aeb2f..84d79ea 100755
--- a/epy.py
+++ b/epy.py
@@ -797,7 +797,7 @@ class Mobi(Epub):
def get_raw_text(self, content_path: Union[str, ET.Element]) -> str:
assert isinstance(content_path, str)
- with open(content_path) as f:
+ with open(content_path, encoding="utf8") as f:
content = f.read()
# return content.decode("utf-8")
return content