From e5a4bfbed97d95fd2a658d6dde003b5af154d95d Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 20 Nov 2023 23:58:14 +0300 Subject: [PATCH] Fix(Py3): Always log in UTF-8 --- Robots/bkmk_rforking_sub.py | 1 + check_url.py | 1 + 2 files changed, 2 insertions(+) diff --git a/Robots/bkmk_rforking_sub.py b/Robots/bkmk_rforking_sub.py index 7892407..8bbf68f 100755 --- a/Robots/bkmk_rforking_sub.py +++ b/Robots/bkmk_rforking_sub.py @@ -33,6 +33,7 @@ def run(): from m_lib.flog import openlog log = openlog("check2.log") + log.outfile.reconfigure(encoding='utf-8') from robots import robot robot = robot(log) diff --git a/check_url.py b/check_url.py index 15a6d33..a43d007 100755 --- a/check_url.py +++ b/check_url.py @@ -38,6 +38,7 @@ def run(): from m_lib.flog import makelog log = makelog("check.log") log.outfile.reconfigure(encoding='utf-8') + sys.stdout.reconfigure(encoding='utf-8') from robots import robot robot = robot(log) -- 2.39.5