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

This commit is contained in:
Marek Fiala
2025-01-02 16:48:43 +01:00
parent ca961274f5
commit 2b0407eb2a
36 changed files with 117 additions and 137 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))