Support non-ASCII compiler messages (assume UTF-8)

Signed-off-by: Gilles Peskine <[email protected]>
This commit is contained in:
Gilles Peskine
2025-09-19 21:12:22 +02:00
parent f7efa1436d
commit 103cdbc45c
@@ -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)