]> OzVa Git service - shopping-channel/commitdiff
specfic encoding for template writing
authorMax Value <greenwoodw50@gmail.com>
Tue, 18 Mar 2025 03:48:21 +0000 (03:48 +0000)
committerMax Value <greenwoodw50@gmail.com>
Tue, 18 Mar 2025 03:48:21 +0000 (03:48 +0000)
teleshopping.py

index 71047c87fb2582690870248d3f947adbf48f6145..7627b6baec49d2d8bff46104020626a1e5c2e704 100755 (executable)
@@ -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")