summaryrefslogtreecommitdiffstats
path: root/Include/fileutils.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/fileutils.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/fileutils.h')
-rw-r--r--Include/fileutils.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/Include/fileutils.h b/Include/fileutils.h
index d027e18..2527d84 100644
--- a/Include/fileutils.h
+++ b/Include/fileutils.h
@@ -24,6 +24,14 @@ PyAPI_FUNC(wchar_t*) _Py_DecodeUTF8_surrogateescape(
const char *s,
Py_ssize_t size,
size_t *p_wlen);
+
+PyAPI_FUNC(wchar_t *) _Py_DecodeCurrentLocale(
+ const char *arg,
+ size_t *size);
+
+PyAPI_FUNC(char*) _Py_EncodeCurrentLocale(
+ const wchar_t *text,
+ size_t *error_pos);
#endif
#ifndef Py_LIMITED_API