[New-bugs-announce] [issue41094] Audit does not work with non-ASCII data on non-UTF-8 locale

Serhiy Storchaka report at bugs.python.org
Tue Jun 23 16:25:16 EDT 2020


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

There are issues with using PySys_Audit() with non-ASCII data on non-UTF-8 locale.

One example is with PYTHONSTARTUP. In pymain_run_startup() in Modules/main.c the value of the PYTHONSTARTUP environment variable is passed to PySys_Audit() as UTF-8 encoded data. If it contains non-ASCII characters and the locale encoding is different from UTF-8, it fails.

There are similar bugs in _Py_fopen() and _Py_fopen_obj().

----------
components: Interpreter Core
messages: 372205
nosy: serhiy.storchaka, steve.dower, vstinner
priority: normal
severity: normal
status: open
title: Audit does not work with non-ASCII data on non-UTF-8 locale
type: behavior
versions: Python 3.10, Python 3.8, Python 3.9

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


More information about the New-bugs-announce mailing list