This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kunkku
Recipients kunkku
Date 2012-10-09.20:09:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Tab completion in the readline module does not seem to work well with Unicode terminals. The get_line_buffer function converts the line buffer to the str type (which are Unicode strings in Python 3), but the indices returned by get_begidx and get_endidx are not adjusted with respect to possible wide characters in the buffer, and hence are not very useful. The documentation is a bit vague on the index functions, but I think they should be relative to code points, regardless of the encoding used by the C library. The suggested correction is attached.

My second point of complaint is related to the use of PyUnicode_FromString in the module. The strings returned by the readline library use the current locale encoding, which is not necessarily UTF-8. I wonder if PyUnicode_DecodeLocale should be used instead for more portable code.
Date User Action Args
2012-10-09 20:09:44kunkkusetrecipients: + kunkku
2012-10-09 20:09:44kunkkusetmessageid: <>
2012-10-09 20:09:44kunkkulinkissue16182 messages
2012-10-09 20:09:43kunkkucreate