From 103cdbc45c12ba01e09c9d3e12a22da6b898de16 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Fri, 1 Aug 2025 22:40:24 +0200 Subject: [PATCH] Support non-ASCII compiler messages (assume UTF-8) Signed-off-by: Gilles Peskine --- scripts/mbedtls_framework/unittest_config_checks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/mbedtls_framework/unittest_config_checks.py b/scripts/mbedtls_framework/unittest_config_checks.py index ba8fc8f98..65e97038b 100644 --- a/scripts/mbedtls_framework/unittest_config_checks.py +++ b/scripts/mbedtls_framework/unittest_config_checks.py @@ -72,7 +72,7 @@ class TestConfigChecks(unittest.TestCase): return None if content and not content.endswith('\n'): content += '\n' - with open(file_name, 'w', encoding='ascii') as out: + with open(file_name, 'w', encoding='utf-8') as out: out.write(content) return file_name @@ -102,7 +102,7 @@ class TestConfigChecks(unittest.TestCase): cmd.append(self.PROJECT_CONFIG_C) return subprocess.run(cmd, check=False, - encoding='ascii', + encoding='utf-8', stdout=subprocess.PIPE, stderr=subprocess.PIPE)