From bba1b8527e26d0c676ee91f884443bb123b6d406 Mon Sep 17 00:00:00 2001 From: jomae Date: Fri, 24 May 2024 17:59:41 +0000 Subject: [PATCH] 1.6.1dev: ensure utf-8 encoding is used when writing to log file (closes #13751) git-svn-id: http://trac.edgewall.org/intertrac/log:/branches/1.6-stable@17804 af82e41b-90c4-0310-8c96-b1721e28e2e2 --- trac/log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trac/log.py b/trac/log.py index 0ff1ada9ad..c4e077baf8 100644 --- a/trac/log.py +++ b/trac/log.py @@ -40,7 +40,7 @@ def logger_handler_factory(logtype='syslog', logfile=None, level='WARNING', logger = logging.getLogger(logid) logtype = logtype.lower() if logtype == 'file': - hdlr = logging.FileHandler(logfile) + hdlr = logging.FileHandler(logfile, encoding='utf-8') elif logtype in ('eventlog', 'winlog', 'nteventlog'): # Requires win32 extensions hdlr = logging.handlers.NTEventLogHandler(logid,