From 769278767ce96b1cb0cee83c1afec79511ecf49c Mon Sep 17 00:00:00 2001 From: Jaekwon Bang Date: Mon, 30 Jan 2023 16:37:23 +0900 Subject: [PATCH] Bug fix to encode html result file --- src/fosslight_prechecker/_result.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fosslight_prechecker/_result.py b/src/fosslight_prechecker/_result.py index 302c628..65e036f 100644 --- a/src/fosslight_prechecker/_result.py +++ b/src/fosslight_prechecker/_result.py @@ -163,7 +163,7 @@ def write_result_html(result_file: str, exit_code: int, result_item: ResultItem, output_dir = os.path.dirname(result_file) Path(output_dir).mkdir(parents=True, exist_ok=True) html_result = result_for_html(result_item, project, path_to_find) - with open(result_file, 'w') as f: + with open(result_file, 'w', encoding='utf-8') as f: f.write(html_result) success = True except Exception as ex: