develooper Front page | perl.perl5.porters | Postings from February 2011

Re: [perl #84680] POSIX::isdigit() returns 1 for the empty string

Thread Previous
From:
Eric Brine
Date:
February 24, 2011 15:30
Subject:
Re: [perl #84680] POSIX::isdigit() returns 1 for the empty string
Message ID:
AANLkTikz3w6d7VBsstbkQmGqzr7=ByJbu4P_wgOWofmF@mail.gmail.com
On Thu, Feb 24, 2011 at 4:42 AM, Mark Overmeer <mark@overmeer.net> wrote:

> * Mark Overmeer (mark@overmeer.net) [110224 09:25]:
> > The real way the implementation should be described is more like:
> >     isdigit  Returns false if the string only contains digits.
>
> Second attempt
>
>   isdigit
>
>       Returns true when all the bytes in the scalar are values in the
>       digits range of the effective character-set. Does not respect
>       the utf8 flag. Does not work with multi-byte character-sets.
>

What does "not respect the UTF8 flag mean"? Does it mean there's an $x where

utf8::downgrade($dx = $x);
utf8::upgrade($ux = $x);
islower($dx) != islower($ux)

If so, we should fix it rather than documented it.

Thread Previous


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