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.

classification
Title: textwrap wordsep_re Unicode
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.1, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: pitrou, skirsche
Priority: normal Keywords: patch

Created on 2008-10-21 20:05 by skirsche, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
textwrap-umlauts.patch skirsche, 2008-10-21 20:05
Messages (3)
msg75037 - (view) Author: Sebastian Kirsche (skirsche) Date: 2008-10-21 20:05
The attached patch makes textwrap work with strings containing dashes 
and Unicode alphabetic characters. In addition, it fixes the test case 
for issue 1149508, which no longer failed after temporarily undoing the 
corresponding change.


Example 1:
    print textwrap.fill(u'Die Empfänger-Auswahl', 13)

Output without patch: 
    Die Empf
    änger-Auswahl

With patch:
    Die
    Empfänger-
    Auswahl


Example 2:
    print textwrap.fill(u'aa ää-ää', 7)

Output without patch:
    aa
    ää-ää

With patch:
    aa ää-
    ää
msg75110 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2008-10-22 21:11
I think it is an useful change indeed. Since it changes behaviour, I'm
not sure it's ok for 2.6.1 or 2.5.3 though.
msg77768 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2008-12-13 23:22
Fixed in r67746 and r67747. Thanks for the patch!
History
Date User Action Args
2022-04-11 14:56:40adminsetgithub: 48413
2008-12-13 23:22:01pitrousetstatus: open -> closed
resolution: fixed
messages: + msg77768
stage: resolved
2008-10-22 21:11:10pitrousetnosy: + pitrou
messages: + msg75110
versions: + Python 3.1, - Python 2.6, Python 2.5, Python 2.5.3
2008-10-21 20:05:22skirschecreate