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

This commit is contained in:
Marek Fiala
2025-01-10 13:52:58 +08:00
committed by BOT
parent 73d1c139e7
commit b37383f75b
39 changed files with 113 additions and 125 deletions
+1 -1
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))