summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2018-01-11 09:37:59 (GMT)
committerGitHub <noreply@github.com>2018-01-11 09:37:59 (GMT)
commitcb3ae5588bd7733e76dc09277bb7626652d9bb64 (patch)
tree137a100f35284a1327a8ec38052433aa21e13281 /Include
parent3948207c610e931831828d33aaef258185df31db (diff)
downloadcpython-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 'Include')
-rw-r--r--Include/unicodeobject.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h
index 576e7ad..d263026 100644
--- a/Include/unicodeobject.h
+++ b/Include/unicodeobject.h
@@ -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,