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

Re: Unicode regex negated case-insensitivity in 5.14.0-RC1

Thread Previous | Thread Next
From:
Tom Christiansen
Date:
April 30, 2011 15:30
Subject:
Re: Unicode regex negated case-insensitivity in 5.14.0-RC1
Message ID:
21409.1304202639@chthon
>On Sat, Apr 30, 2011 at 03:31:23PM -0600, Tom Christiansen wrote:
>> Karl Williamson <public@khwilliamson.com> wrote
>>    on Sat, 30 Apr 2011 15:20:08 MDT: 
>> 
>> > In thinking about this some more, given the bug that Nicholas found that 
>> > affects all multi-character folds, not just \xdf,  in character classes, 
>                                                       ^^^^^^^^^^^^^^^^^^^^

>> Or did you mean something else?

> I think you missed the "in character classes" part of Karl's thought.
> Your examples don't use []

You're right.  I did.  Thanks, Nick.

> I'm still not sure *what* I think.

> But *if* a class consisting of a single character is always equivalent to a
> literal of that character (ie /[a]/ is /a/, /[ß]/ is /ß/, /[ß]/i is /ß/i,
> etc), one of the things I'm not about is whether it's better to say "no
> multi character folds in character classes" or "no multi character folds in
> character classes, except classes consisting of exactly one character". I
> think (I think) that it's useful to maintain that explicit correspondence,
> as (IIRC) Yves worked to get the engine to optimise /[a]/ to /a/ and /[.]/ to
> /\./, as it was a common idiom in some circles to use regexp character class
> syntax as an alternative to backslash quoting.

I remember that.  There was also the way a*a*a*a*a*[b] worked
differently that a*a*a*a*a*b worked.

I agree that /[b]/ and /b/ should really always be the same.

Withdrawing multichar folds in charclasses would certainly be 
less of an issue than withdrawing them altogether.

I don't know how we'll ever know what something *would* do
without doing it.  And I would like to have a workaround 
at ready for anyone who gets affected in a negative way, 
no matter what gets done.

--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