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

Added utf-8 encoding to read_from_file

parent ece0583c
No related branches found
No related tags found
No related merge requests found
......@@ -126,7 +126,7 @@ def write_to_file(file_path, content):
def read_from_file(file_path):
try:
with open(file_path, "r") as file:
with open(file_path, "r", encoding='utf-8') as file:
return file.read()
except FileNotFoundError:
print(f"File not found at: {file_path}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment