From 0634fe021decf6dcccfb7f4501e8367a0b24af0b Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Sat, 8 Mar 2025 19:20:45 +0100 Subject: [PATCH] Datastore - Always use utf-8 encoding for error text output storage --- changedetectionio/model/Watch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changedetectionio/model/Watch.py b/changedetectionio/model/Watch.py index 6fd5d2e7..de9e8aa2 100644 --- a/changedetectionio/model/Watch.py +++ b/changedetectionio/model/Watch.py @@ -527,7 +527,7 @@ class model(watch_base): def save_error_text(self, contents): self.ensure_data_dir_exists() target_path = os.path.join(self.watch_data_dir, "last-error.txt") - with open(target_path, 'w') as f: + with open(target_path, 'w', encoding='utf-8') as f: f.write(contents) def save_xpath_data(self, data, as_error=False):