Serhiy Storchaka added the comment: Yes, the readline module is broken in Python 3. Underlying C library operates C strings and use locale-depended C functions to split it on Unicode characters. The Python wrapper always uses the UTF-8 encoding for converting between Python strings and C strings. It works only on UTF-8 locales. get_begidx() and get_endidx() don't correctly work at all for non-ASCII data. We should use locale encoding for converting.
Proposed patch makes the readline module to use locale depending coding functions instead of default UTF-8. It also corrects indices for get_begidx() and get_endidx(). ---------- nosy: +martin.panter versions: +Python 3.6 -Python 3.4 Added file: http://bugs.python.org/file42952/readline_locale.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16182> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com