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

From: Paul Eggert <[email-masked]>
Date: Sun, 02 Mar 2014 21:05:10 -0800

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.