feat(tools): Enforce utf-8 encoding with open() function

This commit is contained in:
Marek Fiala
2024-07-23 15:59:09 +02:00
committed by BOT
parent 305f1c1e5b
commit 2c814ef2fa
40 changed files with 115 additions and 124 deletions

View File

@@ -165,7 +165,7 @@ def main():
if exc.errno != errno.EEXIST:
raise
with open(output_path, 'w') as f: # only create output file after generation has suceeded
with open(output_path, 'w', encoding='utf-8') as f: # only create output file after generation has succeeded
f.write(output.read())
except LdGenFailure as e:
print('linker script generation failed for %s\nERROR: %s' % (input_file.name, e))