[Python-Dev] Unicode mapping tables
M.-A. Lemburg
mal@lemburg.com
Sun, 05 Mar 2000 20:57:32 +0100
Tim Peters wrote:
>
> [M.-A. Lemburg]
> > ...
> > Here's what I'll do:
> >
> > * implement .capitalize() in the traditional way for Unicode
> > objects (simply convert the first char to uppercase)
>
> Given .title(), is .capitalize() of use for Unicode strings? Or is it just
> a temptation to do something senseless in the Unicode world? If it doesn't
> make sense, leave it out (this *seems* like compulsion <wink> to implement
> all current string methods in *some* way for Unicode, whether or not they
> make sense).
.capitalize() only touches the first char of the string - not
sure whether it makes sense in both worlds ;-)
Anyhow, the difference is there but subtle: string.capitalize()
will use C's toupper() which is locale dependent, while
unicode.capitalize() uses Unicode's toTitleCase() for the first
character.
--
Marc-Andre Lemburg
______________________________________________________________________
Business: http://www.lemburg.com/
Python Pages: http://www.lemburg.com/python/