From ac86c51f608426450dfecc62163a52c9879d49ca Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Tue, 14 Nov 2023 20:56:26 +0300 Subject: [PATCH] Feat: Open log files in UTF-8 encoding --- check_redirects.py | 2 +- check_title.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/check_redirects.py b/check_redirects.py index 1f5c2b0..c9161d9 100755 --- a/check_redirects.py +++ b/check_redirects.py @@ -48,7 +48,7 @@ def run(): sys.exit(1) if log_filename: - log_file = open(log_filename, 'wt') + log_file = open(log_filename, 'wt', encoding='utf-8') from storage import storage storage = storage() diff --git a/check_title.py b/check_title.py index c30e025..391f5a1 100755 --- a/check_title.py +++ b/check_title.py @@ -52,7 +52,7 @@ def run(): sys.exit(1) if log_filename: - log_file = open(log_filename, 'wt') + log_file = open(log_filename, 'wt', encoding='utf-8') from storage import storage storage = storage() @@ -81,7 +81,7 @@ def run(): unquoted_title = unquote_title(quote_title(object.real_title)) unquoted_name = unquote_title(object.name) if unquoted_name != unquoted_title: - report_title(object.href, unquoted_name unquoted_title) + report_title(object.href, unquoted_name, unquoted_title) else: report_title(object.href, object.name, None) -- 2.39.5