summaryrefslogtreecommitdiffstats
path: root/Include/unicodeobject.h
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2018-01-10 21:46:15 (GMT)
committerGitHub <noreply@github.com>2018-01-10 21:46:15 (GMT)
commit2cba6b85797ba60d67389126f184aad5c9e02ff3 (patch)
tree5cc0972b12e1c85e58c4ff57edc312882f107ff1 /Include/unicodeobject.h
parentf80c0ca13330112fe4d8018609c085ef556cb5bf (diff)
downloadcpython-2cba6b85797ba60d67389126f184aad5c9e02ff3.zip
cpython-2cba6b85797ba60d67389126f184aad5c9e02ff3.tar.gz
cpython-2cba6b85797ba60d67389126f184aad5c9e02ff3.tar.bz2
bpo-29240: readline now ignores the UTF-8 Mode (#5145)
Add new fuctions ignoring the UTF-8 mode: * _Py_DecodeCurrentLocale() * _Py_EncodeCurrentLocale() * _PyUnicode_DecodeCurrentLocaleAndSize() * _PyUnicode_EncodeCurrentLocale() Modify the readline module to use these functions. Re-enable test_readline.test_nonascii().
Diffstat (limited to 'Include/unicodeobject.h')
-rw-r--r--Include/unicodeobject.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h
index 0274de6..576e7ad 100644
--- a/Include/unicodeobject.h
+++ b/Include/unicodeobject.h
@@ -1810,6 +1810,16 @@ PyAPI_FUNC(PyObject*) PyUnicode_EncodeLocale(
PyObject *unicode,
const char *errors
);
+
+PyAPI_FUNC(PyObject*) _PyUnicode_DecodeCurrentLocaleAndSize(
+ const char *str,
+ Py_ssize_t len,
+ const char *errors);
+
+PyAPI_FUNC(PyObject*) _PyUnicode_EncodeCurrentLocale(
+ PyObject *unicode,
+ const char *errors
+ );
#endif
/* --- File system encoding ---------------------------------------------- */