mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
bpo-34523: Fix C locale coercion on FreeBSD CURRENT (GH-10672)
bpo-34523, bpo-35290: C locale coercion now resets the Python internal "force ASCII" mode. This change fix the filesystem encoding on FreeBSD CURRENT, which has a new "C.UTF-8" locale, when the UTF-8 mode is disabled. Add _Py_ResetForceASCII(): _Py_SetLocaleFromEnv() now calls it.
This commit is contained in:
parent
e89607c0fc
commit
353933e712
3 changed files with 29 additions and 4 deletions
|
@ -32,6 +32,14 @@ PyAPI_FUNC(wchar_t*) _Py_DecodeUTF8_surrogateescape(
|
|||
|
||||
PyAPI_FUNC(int) _Py_GetForceASCII(void);
|
||||
|
||||
/* Reset "force ASCII" mode (if it was initialized).
|
||||
|
||||
This function should be called when Python changes the LC_CTYPE locale,
|
||||
so the "force ASCII" mode can be detected again on the new locale
|
||||
encoding. */
|
||||
PyAPI_FUNC(void) _Py_ResetForceASCII(void);
|
||||
|
||||
|
||||
PyAPI_FUNC(int) _Py_GetLocaleconvNumeric(
|
||||
struct lconv *lc,
|
||||
PyObject **decimal_point,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue