develooper Front page | perl.perl5.porters | Postings from April 2000

Re: PATCH: perlre.pod (against 5.6.0)

Thread Previous | Thread Next
From:
Tom Christiansen
Date:
April 30, 2000 10:41
Subject:
Re: PATCH: perlre.pod (against 5.6.0)
Message ID:
31789.957116467@chthon
>:>l179: \u      titlecase next char
>:>Not sure what 'titlecase' means, or why it is more accurate than
>:>'uppercase', nor why \U was not similarly changed.
>:
>:Because that doesn't happen there.  "titlecase" is a Unicode notion.
>:(It's somewhat misleading, since it doesn't really understand proper
>:titlecasing rules in English.)  But some scripts (read: charsets)
>:allegedly distinguish between these.  That's why toke.c has
>:toUPPER_LC_uni for uc(), but toTITLE_LC_uni for ucfirst().

>I think that's worth expanding on then: taking myself as the
>epitome of the man on the Clapham omnibus, the reader will not
>know what this word means until it is explained.

Well, it's in here:

    =item uc

    Returns an uppercased version of EXPR.  This is the internal
    function implementing the C<\U> escape in double-quoted strings.
    Respects current LC_CTYPE locale if C<use locale> in force.
    See L<perllocale>.  Under Unicode (C<use utf8>) it uses the
    standard Unicode uppercase mappings.  (It does not attempt to
    do titlecase mapping on initial letters.  See C<ucfirst> for
    that.)

    =item ucfirst

    Returns the value of EXPR with the first character in uppercase
    (titlecase in Unicode).  This is the internal function implementing
    the C<\u> escape in double-quoted strings.  Respects current
    LC_CTYPE locale if C<use locale> in force.  See L<perllocale>
    and L<utf8>.

Do you not like that?

--tom

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About