bug-grep
[Top][All Lists]
Advanced

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

Re: [PATCH] dfa: fix single byte character ranges


From: Jim Meyering
Subject: Re: [PATCH] dfa: fix single byte character ranges
Date: Thu, 25 Mar 2010 21:33:34 +0100

Dmitry V. Levin wrote:
> On Thu, Mar 25, 2010 at 01:39:42PM +0100, Paolo Bonzini wrote:
>> On 03/25/2010 01:13 PM, Paolo Bonzini wrote:
>> >* src/dfa.c (in_coll_range): Fix ordering for second strcoll.  Reported
>> >by Dmitry V. Levin.
>> >* tests/spencer1-locale.awk: Also test single-byte character sets.
>> >* THANKS: Add Dmitry.
>> >---
>> >         Rather than adding a specific testcase, I added more locales
>> >         to the spencer1-locale test.
>>
>> I pushed this with a NEWS entry.
>
> Thank you for the fix.  The bug is not limited to single byte locales,
> though:
>
> $ echo 1 | env -i grep '[0-9]'
> 1
> $ echo 1 | env -i LC_COLLATE=en_US.UTF-8 grep '[0-9]'
> $ echo 1 | env -i LANG=en_US.UTF-8 grep '[0-9]'
> 1
>
> Your patch fixes this regression, too.

Thanks for the correction.  I've already released 2.6.1,
but I'll adjust the now-old NEWS like this:

>From 58c2e11a8b6849c4c602470fcc2466d0586a4d6f Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Thu, 25 Mar 2010 21:32:41 +0100
Subject: [PATCH] doc: correct and amend NEWS entries for 2.6.1

* NEWS (Bug fixes): Correct character ranges bug description.
Add an example from Dmitry V. Levin.
Add that the word-with-backref bug was introduced in 2.5.1.
* cfg.mk (old_NEWS_hash): Update to match.
---
 NEWS   |    7 +++++--
 cfg.mk |    2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/NEWS b/NEWS
index 32ea885..2e0414e 100644
--- a/NEWS
+++ b/NEWS
@@ -11,10 +11,13 @@ GNU grep NEWS                                    -*- 
outline -*-
   multibyte character.  [bug introduced in 2.6]

   Character ranges would not work in single-byte character sets other
-  than C (for example, ISO-8859-1 or KOI8-R).  [bug introduced in 2.6]
+  than C (for example, ISO-8859-1 or KOI8-R) and some multi-byte locales.
+  For example, this should print "1", but would find no match:
+    $ echo 1 | env -i LC_COLLATE=en_US.UTF-8 grep '[0-9]'
+  [bug introduced in 2.6]

   The output of grep was incorrect for whole-word (-w) matches if the
-  patterns included a backreference.
+  patterns included a back-reference. [bug introduced in grep-2.5.2]

 ** Portability

diff --git a/cfg.mk b/cfg.mk
index 7dca4f9..7f0aebe 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -31,7 +31,7 @@ bootstrap-tools = autoconf,automake,gnulib
 # Now that we have better tests, make this the default.
 export VERBOSE = yes

-old_NEWS_hash = 72edfd3113c3b264a77f6f9efab18e38
+old_NEWS_hash = fbb9531f83022157e85039a8ed8f6dad

 # Many m4 macros names once began with `jm_'.
 # Make sure that none are inadvertently reintroduced.
--
1.7.0.3.448.g82eeb




reply via email to

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