New submission from Serhiy Storchaka <storchaka+cpyt...@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 <rep...@bugs.python.org> <https://bugs.python.org/issue41094> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com