develooper Front page | perl.perl5.porters | Postings from September 2013

Re: RFC: What to do about warning: "Code point 0xFOO is not Unicode, all \\p{} matches fail; all \\P{} matches succeed"

Thread Previous | Thread Next
From:
Father Chrysostomos
Date:
September 13, 2013 08:55
Subject:
Re: RFC: What to do about warning: "Code point 0xFOO is not Unicode, all \\p{} matches fail; all \\P{} matches succeed"
Message ID:
20130913085503.2940.qmail@lists-nntp.develooper.com
Nicholas Clark wrote:
> 1) this means that it's still viable to use out-of-range code points for
>    "internal" purposes without generating so many warnings that they get
>    turned off
> 2) it permits a warning that is useful to leave on by default
> 3) the warning can be made fatal for strict(er) behaviour
> 
> 
> But what it doesn't (directly) offer is a way for a Unicode purist to treat
> as fatal any attempt to match an out-of-range code point.

I have said this before and am going to say it again:  I think it’s
wrong for the regular expression engine ever to warn (let alone croak)
based on data passed to it.

It just means that data fed to some module that doesn’t care what data
its getting (it just does some matches and then passes it through)
will cause it to blow up because fatal warnings happened to be on.
Or it will cause the module to produce warnings even though there is
nothing wrong with the code, and the caller has every reason to pass
non-Unicode data through it.

The end result is that I have to money-patch warnings.pm to get
things to work.


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