mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2025-09-13 07:21:16 +00:00
Assert text files are in utf8 (#350)
Read and write text files with utf8 encoding. Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
This commit is contained in:
@@ -150,7 +150,7 @@ def main():
|
||||
|
||||
try:
|
||||
if args.input_file:
|
||||
with open(args.input_file, "r") as f:
|
||||
with open(args.input_file, "r", encoding="utf8") as f:
|
||||
content = f.read()
|
||||
elif args.input:
|
||||
content = args.input
|
||||
@@ -164,7 +164,7 @@ def main():
|
||||
)
|
||||
if args.output_file:
|
||||
# Write to file
|
||||
with open(args.output_file, "w") as f:
|
||||
with open(args.output_file, "w", encoding="utf8") as f:
|
||||
f.write(extracted_content)
|
||||
else:
|
||||
# Write to std output
|
||||
|
Reference in New Issue
Block a user