From 42d429954d84f20f7913f3f823dae3281a92a078 Mon Sep 17 00:00:00 2001 From: Max Value Date: Tue, 18 Mar 2025 03:48:21 +0000 Subject: [PATCH] specfic encoding for template writing --- teleshopping.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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") -- 2.39.2