From: Max Value Date: Tue, 18 Mar 2025 03:48:21 +0000 (+0000) Subject: specfic encoding for template writing X-Git-Url: https://git.ozva.co.uk/?a=commitdiff_plain;h=42d429954d84f20f7913f3f823dae3281a92a078;p=shopping-channel specfic encoding for template writing --- diff --git a/teleshopping.py b/teleshopping.py index 71047c8..7627b6b 100755 --- a/teleshopping.py +++ b/teleshopping.py @@ -229,7 +229,7 @@ def check_generate(): template = latex_enviroment.get_template(document) docs_path = path.join(app.root_path, "docs") - with open(path.join(docs_path, document), "w") as f: + with open(path.join(docs_path, document), "w", encoding="utf-8") as f: f.write(template.render(data=static_data, info=static_info)) system(f"pdflatex -interaction='nonstopmode' -output-directory='{docs_path}' '{path.join(docs_path, document)}' > /dev/zero")