From 5661b9f770c149bca095cd49cae6c5797ee186ba Mon Sep 17 00:00:00 2001
From: Juuso Rytilahti <rytilahti.juuso@gmail.com>
Date: Tue, 26 Sep 2023 10:59:06 +0300
Subject: [PATCH] Now the output and debug files are encoded with 'utf-8'

---
 translator_script.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/translator_script.py b/translator_script.py
index 8e6b5cf..50ef3c0 100644
--- a/translator_script.py
+++ b/translator_script.py
@@ -118,9 +118,9 @@ def split_into_chunks(input_string, chunk_size=240):
 
 def write_to_file(file_path, content):
     try:
-        with open(file_path, 'w') as file:
+        with open(file_path, 'w', encoding='utf-8') as file:
             file.write(content)
-        print("Successfully wrote to the file." + file_path)
+        print("Successfully wrote to the file: " + file_path)
     except Exception as e:
         print(f"An error occurred: {e}")
 
-- 
GitLab