Skip to content
Snippets Groups Projects
Commit 5661b9f7 authored by Juuso Rytilahti's avatar Juuso Rytilahti
Browse files

Now the output and debug files are encoded with 'utf-8'

parent 4a98872c
No related branches found
No related tags found
No related merge requests found
...@@ -118,9 +118,9 @@ def split_into_chunks(input_string, chunk_size=240): ...@@ -118,9 +118,9 @@ def split_into_chunks(input_string, chunk_size=240):
def write_to_file(file_path, content): def write_to_file(file_path, content):
try: try:
with open(file_path, 'w') as file: with open(file_path, 'w', encoding='utf-8') as file:
file.write(content) file.write(content)
print("Successfully wrote to the file." + file_path) print("Successfully wrote to the file: " + file_path)
except Exception as e: except Exception as e:
print(f"An error occurred: {e}") print(f"An error occurred: {e}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment