bpo-29240: Ignore UTF-8 Mode in time module (#5148)

time.strftime() must use the current LC_CTYPE encoding, not UTF-8
if the UTF-8 mode is enabled.

Add _PyUnicode_DecodeCurrentLocale() function.
This commit is contained in:
Victor Stinner 2018-01-11 10:37:59 +01:00 committed by GitHub
parent 3948207c61
commit cb3ae5588b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 8 deletions

View file

@ -1811,6 +1811,10 @@ PyAPI_FUNC(PyObject*) PyUnicode_EncodeLocale(
const char *errors
);
PyAPI_FUNC(PyObject*) _PyUnicode_DecodeCurrentLocale(
const char *str,
const char *errors);
PyAPI_FUNC(PyObject*) _PyUnicode_DecodeCurrentLocaleAndSize(
const char *str,
Py_ssize_t len,