From 644acec469bf5dd49a9fb5ef3a706010828823a1 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 19 Feb 2024 13:45:45 +0000 Subject: [PATCH] Specify encoding --- newsdaemon.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/newsdaemon.py b/newsdaemon.py index cbdc07725..12fd072e7 100644 --- a/newsdaemon.py +++ b/newsdaemon.py @@ -51,7 +51,8 @@ def _update_feeds_outbox_index(base_dir: str, domain: str, if os.path.isfile(index_filename): if not text_in_file(post_id, index_filename): try: - with open(index_filename, 'r+') as feeds_file: + with open(index_filename, 'r+', + encoding='utf-8') as feeds_file: content = feeds_file.read() if post_id + '\n' not in content: feeds_file.seek(0, 0)