Hi Paolo,
Do you have a test that exercises this fix?
As far as I can see, the above tests currently succeed
with grep built from master. I expected them to fail.
It passes because strcoll (and hences ranges) is case-insensitive in
many locales:
$ printf '1\ny\n.\n' | LC_ALL=en_US.UTF-8 grep '[A-Z]'
y
(Note no -i). It would fail in something like C.UTF-8, but it is not
portable and as far as I know it only works under Cygwin---not even
glibc supports it:
$ LC_ALL=C.UTF-8 bash
bash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)
So I included the test more for completeness than anything else, hoping
that we get coverage on a system where strcoll is case sensitive.
Paolo