bug-grep
[Top][All Lists]
Advanced

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

Re: [PATCH 2/9] dfa: fix handling of ranges in multibyte character sets


From: Paolo Bonzini
Subject: Re: [PATCH 2/9] dfa: fix handling of ranges in multibyte character sets
Date: Mon, 15 Mar 2010 11:59:58 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100301 Fedora/3.0.3-1.fc12 Lightning/1.0b2pre Thunderbird/3.0.3


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




reply via email to

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