Fix #1: UnicodeDecodeError on Windows10
This commit is contained in:
parent
022b746767
commit
23da56a41c
4 changed files with 8 additions and 3 deletions
5
CHANGES
5
CHANGES
|
@ -2,6 +2,11 @@
|
|||
Changes
|
||||
=======
|
||||
|
||||
0.1.3 (*2021-01-10*)
|
||||
====================
|
||||
|
||||
- Fix decode error on Windows 10
|
||||
|
||||
0.1.2 (*2020-07-08*)
|
||||
====================
|
||||
|
||||
|
|
2
setup.py
2
setup.py
|
@ -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",
|
||||
|
|
|
@ -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]:
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue