diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2018-01-11 09:37:59 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-11 09:37:59 (GMT) |
commit | cb3ae5588bd7733e76dc09277bb7626652d9bb64 (patch) | |
tree | 137a100f35284a1327a8ec38052433aa21e13281 /Modules/readline.c | |
parent | 3948207c610e931831828d33aaef258185df31db (diff) | |
download | cpython-cb3ae5588bd7733e76dc09277bb7626652d9bb64.zip cpython-cb3ae5588bd7733e76dc09277bb7626652d9bb64.tar.gz cpython-cb3ae5588bd7733e76dc09277bb7626652d9bb64.tar.bz2 |
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.
Diffstat (limited to 'Modules/readline.c')
-rw-r--r-- | Modules/readline.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/readline.c b/Modules/readline.c index 8db4cfd..caf661c 100644 --- a/Modules/readline.c +++ b/Modules/readline.c @@ -138,8 +138,7 @@ encode(PyObject *b) static PyObject * decode(const char *s) { - return _PyUnicode_DecodeCurrentLocaleAndSize(s, strlen(s), - "surrogateescape"); + return _PyUnicode_DecodeCurrentLocale(s, "surrogateescape"); } |