[Python-Dev] Unicode mapping tables
Guido van Rossum
guido@python.org
Wed, 01 Mar 2000 07:27:10 -0500
> Here's what I'll do:
>
> * implement .capitalize() in the traditional way for Unicode
> objects (simply convert the first char to uppercase)
> * implement u.title() to mean the same as Java's toTitleCase()
> * don't implement s.title(): the reasoning here is that it would
> confuse the user when she get's different return values for
> the same string (titlecase chars usually live in higher Unicode
> code ranges not reachable in Latin-1)
Huh? For ASCII at least, titlecase seems to map to ASCII; in your
current implementation, only two Latin-1 characters (u'\265' and
u'\377', I have no easy way to show them in Latin-1) map outside the
Latin-1 range.
Anyway, I would suggest to add a title() call to 8-bit strings as
well; then we can do away with string.capwords(), which does something
similar but different, mostly by accident.
--Guido van Rossum (home page: http://www.python.org/~guido/)