[issue16182] readline: Wrong tab completion scope indices in Unicode terminals

2012-10-09 Thread Kaarle Ritvanen

New submission from Kaarle Ritvanen:

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.

--
components: Library (Lib)
files: readline-wide-char-index.patch
keywords: patch
messages: 172517
nosy: kunkku
priority: normal
severity: normal
status: open
title: readline: Wrong tab completion scope indices in Unicode terminals
type: behavior
versions: Python 3.2, Python 3.3
Added file: http://bugs.python.org/file27508/readline-wide-char-index.patch

___
Python tracker 
<http://bugs.python.org/issue16182>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20491] textwrap: Non-breaking space not honored

2014-02-02 Thread Kaarle Ritvanen

New submission from Kaarle Ritvanen:

The textwrap module does not distinguish non-breaking space (\xa0) from other 
whitespace when determining word boundaries.

In the beginning of the module, the _whitespace variable is defined to address 
this issue but is not used in the regular expressions determining the splitting 
rules.

--
components: Library (Lib)
files: textwrap-honor-non-breaking-spaces.patch
keywords: patch
messages: 210013
nosy: kunkku
priority: normal
severity: normal
status: open
title: textwrap: Non-breaking space not honored
type: behavior
versions: Python 3.3, Python 3.4, Python 3.5
Added file: 
http://bugs.python.org/file33872/textwrap-honor-non-breaking-spaces.patch

___
Python tracker 
<http://bugs.python.org/issue20491>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20491] textwrap: Non-breaking space not honored

2014-02-03 Thread Kaarle Ritvanen

Changes by Kaarle Ritvanen :


Added file: 
http://bugs.python.org/file33890/textwrap-honor-non-breaking-spaces.patch

___
Python tracker 
<http://bugs.python.org/issue20491>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20491] textwrap: Non-breaking space not honored

2014-02-04 Thread Kaarle Ritvanen

Changes by Kaarle Ritvanen :


Added file: http://bugs.python.org/file33911/honor-non-breaking-spaces.patch

___
Python tracker 
<http://bugs.python.org/issue20491>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com