[New-bugs-announce] [issue41140] cgitb uses the locale encoding for log files

Serhiy Storchaka report at bugs.python.org
Sat Jun 27 07:31:23 EDT 2020

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

If logdir is not None the exception handler in cgitb tries to save the description of an error in that directory using the locale encoding. It will fail if the description contains non-encodable characters.

We should either use corresponding error handlers (e.g. 'xmlcharrreplace' for html and 'backslashreplace' for text) for handling encoding errors or use the UTF-8 encoding.

components: Library (Lib)
messages: 372463
nosy: Rhodri James, ethan.furman, serhiy.storchaka, vinay.sajip
priority: normal
severity: normal
status: open
title: cgitb 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>

More information about the New-bugs-announce mailing list