-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Audit does not work with non-ASCII data on non-UTF-8 locale #85266
Comments
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(). |
SGTM. Thanks for the PR! |
Oh, I made a mistake in tests (they do not test with non-ASCII data), but fixed tests fail on Windows. |
The problem is that they pass successfully on my local Windows, but fail on CI. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: