[New-bugs-announce] [issue41139] cgi uses the locale encoding for log files

Serhiy Storchaka report at bugs.python.org
Sat Jun 27 07:30:05 EDT 2020


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

The cgi module provides undocumented feasibility for logging. cgi.log() formats log message and appends it to the log file with name specified by cgi.logfile if it was not empty before the first use of cgi.log().

One of problems is that it uses the locale encoding for log file. Therefore the result depends on the locale at the moment of the first use of cgi.log().

We can fix this by using some fixed encoding (UTF-8). Or maybe just remove this undocumented feature.

----------
messages: 372462
nosy: Rhodri James, ethan.furman, serhiy.storchaka, vinay.sajip
priority: normal
severity: normal
status: open
title: cgi uses the locale encoding for log files
type: behavior
versions: Python 3.10, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41139>
_______________________________________


More information about the New-bugs-announce mailing list