GNU bug report logs - #24973
[regression] [d-f] no longer includes e with acute accent in single-byte locales

Previous Next

Package: grep;

Reported by: Stephane Chazelas <stephane.chazelas <at> gmail.com>

Date: Sun, 20 Nov 2016 21:15:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: bug-gnulib <at> gnu.org, 24973 <at> debbugs.gnu.org, stephane.chazelas <at> gmail.com
Cc: Paul Eggert <eggert <at> cs.ucla.edu>
Subject: bug#24973: [PATCH] dfa: fix logic typo
Date: Sun, 20 Nov 2016 20:18:38 -0800
Problem reported by Stephane Chazelas (Bug#24973).
* lib/dfa.c (using_simple_locale): Fix typo that caused some
non-simple locales like fr_FR to be treated as simple.
---
 ChangeLog | 7 +++++++
 lib/dfa.c | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 88139c3..fbdecf0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2016-11-20  Paul Eggert  <eggert <at> cs.ucla.edu>
+
+	dfa: fix logic typo
+	Problem reported by Stephane Chazelas (Bug#24973).
+	* lib/dfa.c (using_simple_locale): Fix typo that caused some
+	non-simple locales like fr_FR to be treated as simple.
+
 2016-11-20  Jim Meyering  <meyering <at> fb.com>
 
 	fix test driver leaks: exclude, malloc, realloc
diff --git a/lib/dfa.c b/lib/dfa.c
index 744a9f1..7b80a1a 100644
--- a/lib/dfa.c
+++ b/lib/dfa.c
@@ -815,8 +815,8 @@ using_simple_locale (bool multibyte)
      && '}' == 125 && '~' == 126)
   };
 
-  if (native_c_charset && !multibyte)
-    return true;
+  if (!native_c_charset || multibyte)
+    return false;
   else
     {
       /* Treat C and POSIX locales as being compatible.  Also, treat
-- 
2.7.4





This bug report was last modified 8 years and 184 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.