Fix #1: UnicodeDecodeError on Windows10

This commit is contained in:
Kujiu 2021-01-10 20:51:36 +01:00
parent 022b746767
commit 23da56a41c
Signed by: kujiu
GPG Key ID: ABBB2CAC6855599F
4 changed files with 8 additions and 3 deletions

View File

@ -2,6 +2,11 @@
Changes
=======
0.1.3 (*2021-01-10*)
====================
- Fix decode error on Windows 10
0.1.2 (*2020-07-08*)
====================

View File

@ -28,7 +28,7 @@ with open("README.rst", "r") as fh:
setup(
name="sphinx_weasyprint_builder",
version="0.1.2",
version="0.1.3",
url="https://procrastinator.nerv-project.eu/nerv-project/sphinx_weasyprint_builder",
license="EUPL 1.2",
author="Kujiu",

View File

@ -6,7 +6,7 @@ from sphinx.application import Sphinx
from sphinx.util.osutil import make_filename
version = (0, 1, 2)
version = (0, 1, 3)
def setup(app: Sphinx) -> Dict[str, Any]:

View File

@ -39,7 +39,7 @@ class PdfGenerator:
header_selector: str
) -> None:
self.base_url = base_url
with open(self.base_url) as htmlfile:
with open(self.base_url, encoding='utf8') as htmlfile:
self.main_html = htmlfile.read()
self.footer_html = None