A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-October/029710.html below:

[Python-Dev] textwrap and unicode

[Python-Dev] textwrap and unicode [Python-Dev] textwrap and unicodeGreg Ward gward@python.net
Tue, 22 Oct 2002 15:24:39 -0400
Well, my ignorance of Unicode has finally bitten me -- someone filed a
bug (#622831) against textwrap.py because it crashes when it attempts to
wrap a Unicode string.

Here are the problems that I am aware of:

  * textwrap assumes "whitespace" means "the characters in
    string.whitespace"

  * textwrap assumes "lowercase letter" means "the characters in
    string.lowercase" (heck, this only works in English)

Can someone tell me what the proper way to do this is?  Or just point me
at the relevant documentation?  I've scoured the online docs and *Python
Essential Reference*, and I know more about the codes and unicodedata
modules than I did before.  But I still don't know how to replace all
whitespace with space, or detect words that end with a lowercase letter.

Thanks --

        Greg
-- 
Greg Ward <gward@python.net>                         http://www.gerg.ca/
I brought my BOWLING BALL -- and some DRUGS!!



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4