Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Description
Feature or enhancement
Proposal:
This is a follow-up to the discussion in#126555 (comment).
dlerror() may return non-UTF-8 messages, possibly translated. We should be able to set exception messages according to the current locale. To that end, we'll expose some internal helper:
externvoid_PyErr_SetLocaleStringTstate(PyThreadState*tstate,PyObject*exception,constchar*string);externvoid_PyErr_SetLocaleString(PyObject*exception,constchar*string);
For now, both functions would be only declared asextern and not part of the public C API.
Linked PRs
[3.13] gh-126742: Add _PyErr_SetLocaleString, use it for gdbm & dlerror messages (GH-126746) #128023
[3.12] gh-126742: Add _PyErr_SetLocaleString, use it for gdbm & dlerror messages (GH-126746) #128027
gh-126742: avoid checking for library filename in
dlerror()error messages #128034[3.13] gh-126742: Avoid checking for library filename in test_ctypes (GH-128034) #128056
[3.12] gh-126742: Avoid checking for library filename in test_ctypes (GH-128034) #128057
[3.13] gh-126742: add NEWS entry for fix of localized error messages (GH-128025) #128059
[3.12] gh-126742: add NEWS entry for fix of localized error messages (GH-128025) #128060