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:
Ricardo Signes
Date:
September 13, 2013 02:35
Subject:
Re: RFC: What to do about warning: "Code point 0xFOO is not Unicode,all \\p{} matches fail; all \\P{} matches succeed"
Message ID:
20130913023518.GD1169@cancer.codesimply.com
* Karl Williamson <public@khwilliamson.com> [2013-09-11T22:57:24]
> I've done some more thinking about this, and am presenting here my
> current thoughts.

Thanks for this.  I think I an on board with you, for the most part.

Figuring out who the various I's are in DWIM is always a good exercise.

> There are some flies in the ointment though.  I don't think \p{Any}
> and \p{All} should match anything but strictly Unicode code points.
> We already have a well established way to match all code points, and
> that is to use the dot ".".  But I'm open to arguments the other
> way.

A dot might work, but then you're thinking about /s again.  But more to the
point, I just wonder why you think those properties shouldn't match?  Do you
think users will be trying to exclude weird codepoints by using those?  I guess
what I want to know is:  who is the DWIM person who benefits from excluding
\x{FF_FFFF}?  Does he or she know that there may be trans-Unicode points
incoming and want to exclude them?  If so, why not fatalize warnings, or
also require Unicode explicitly?  Or are we protecting them from weird input?

> But I'm tempted to move somewhat more towards the Perlish side of
> things, and change the warning/error message so that it is raised
> only when the result would be different under a Perlish vs Unicodish
> regime.

I think this makes sense.  Maybe I want to think about it more, or see whether
somebody else has an objection. :)

-- 
rjbs

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