Specify encoding for HTML report for special characters

This commit is contained in:
Roch Bertucat
2020-12-10 10:35:47 +01:00
parent 860d795ba1
commit cada9c9e3b
+1 -1
View File
@@ -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))