mirror of
https://github.com/python/cpython.git
synced 2025-07-13 06:15:17 +00:00
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:
parent
3948207c61
commit
cb3ae5588b
4 changed files with 17 additions and 8 deletions
|
@ -3836,6 +3836,12 @@ _PyUnicode_DecodeCurrentLocaleAndSize(const char *str, Py_ssize_t len,
|
|||
return unicode_decode_locale(str, len, errors, 1);
|
||||
}
|
||||
|
||||
PyObject*
|
||||
_PyUnicode_DecodeCurrentLocale(const char *str, const char *errors)
|
||||
{
|
||||
return unicode_decode_locale(str, (Py_ssize_t)strlen(str), errors, 1);
|
||||
}
|
||||
|
||||
PyObject*
|
||||
PyUnicode_DecodeLocale(const char *str, const char *errors)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue