mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
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().
This commit is contained in:
parent
f80c0ca133
commit
2cba6b8579
6 changed files with 126 additions and 43 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue