bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#16919: [PATCH] fix mismatch between dfa and regex for treatment of t


From: Paul Eggert
Subject: bug#16919: [PATCH] fix mismatch between dfa and regex for treatment of titlecase
Date: Sun, 02 Mar 2014 21:05:10 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

Paul Eggert wrote:
POSIX is muddy in this area, unfortunately, but I don't see any
interpretation whereby ς and σ should match when case is ignored.

On second thought, I may have been too strict here. I suppose one could interpret POSIX to say that since 'σ' == tolower (toupper ('ς')), that it should be OK for the pattern 'σ' to match the string 'ς' when ignoring case, even though the characters differ and are both lowercase.

Still, there's a problem that the dfa code behaves differently than the regex code. One way to make them behave the same would be for the dfa code to set *backref to 1 when ignoring case and when an alphabetic character in the pattern is matched in a non-POSIX locale. This would have performance consequences, though. Perhaps we can think of a better way.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]