From cada9c9e3b6568db1d8cb0320444032c8536e27a Mon Sep 17 00:00:00 2001 From: Roch Bertucat Date: Thu, 10 Dec 2020 10:35:47 +0100 Subject: [PATCH] Specify encoding for HTML report for special characters --- src/ifcbimtester/bimtester/reports.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcbimtester/bimtester/reports.py b/src/ifcbimtester/bimtester/reports.py index cc6a09373f..bb82ea3b71 100644 --- a/src/ifcbimtester/bimtester/reports.py +++ b/src/ifcbimtester/bimtester/reports.py @@ -94,6 +94,6 @@ def generate_report(adir="."): data["pass_rate"] = round((data["total_passes"] / data["total_steps"]) * 100) html_report_file = os.path.join(report_dir, "{}.html".format(file_name)) - with open(html_report_file, "w") as out: + with open(html_report_file, "w", encoding="utf-8") as out: with open(html_template_file) as template: out.write(pystache.render(template.read(), data))