Message172517
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:44 | kunkku | set | recipients:
+ kunkku |
2012-10-09 20:09:44 | kunkku | set | messageid: <1349813384.06.0.615857426211.issue16182@psf.upfronthosting.co.za> |
2012-10-09 20:09:44 | kunkku | link | issue16182 messages |
2012-10-09 20:09:43 | kunkku | create | |
|