From 3f1ef6e24395e39bbcf8462ef33bc64fa538d64e Mon Sep 17 00:00:00 2001 From: David Wilson Date: Sun, 10 Mar 2019 18:58:55 +0000 Subject: [PATCH] master: expect forwarded logs to be in UTF-8. latin1 was causing corruption of internationalized messages. --- mitogen/master.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mitogen/master.py b/mitogen/master.py index 2db78ba0..ff6f3922 100644 --- a/mitogen/master.py +++ b/mitogen/master.py @@ -394,7 +394,7 @@ class LogForwarder(object): name = '%s.%s' % (RLOG.name, context.name) self._cache[msg.src_id] = logger = logging.getLogger(name) - name, level_s, s = msg.data.decode('latin1').split('\x00', 2) + name, level_s, s = msg.data.decode('utf-8', 'replace').split('\x00', 2) # See logging.Handler.makeRecord() record = logging.LogRecord(