emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#19095: closed ([PATCH] grep: grep -F fails to matc


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#19095: closed ([PATCH] grep: grep -F fails to match at the next position after matched middle of a multi-byte character)
Date: Fri, 21 Nov 2014 16:41:03 +0000

Your message dated Fri, 21 Nov 2014 08:40:06 -0800
with message-id <address@hidden>
and subject line Re: bug#19095: [PATCH] grep: grep -F fails to match at the 
next position after matched middle of a multi-byte character
has caused the debbugs.gnu.org bug report #19095,
regarding [PATCH] grep: grep -F fails to match at the next position after 
matched middle of a multi-byte character
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
19095: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19095
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [PATCH] grep: grep -F fails to match at the next position after matched middle of a multi-byte character Date: Wed, 19 Nov 2014 00:45:57 +0900
grep -F skips an extra character after matched middle of multi-byte
character.  As a result, fails to match at the next position.  A test
case for this bug is already included in tests/sjis-mb.

For example, Following test is failure on grep-2.19 or later.

$ printf '\203AA\n' >in
$ env LC_ALL=ja_JP.SHIFT-JIS src/grep -F A in

We expect that it matches at the second A and outputs the line, but
doesn't output.

Attachment: 0001-grep-grep-F-fails-to-match-at-the-next-position-afte.patch
Description: Text document


--- End Message ---
--- Begin Message --- Subject: Re: bug#19095: [PATCH] grep: grep -F fails to match at the next position after matched middle of a multi-byte character Date: Fri, 21 Nov 2014 08:40:06 -0800
On Thu, Nov 20, 2014 at 2:53 PM, Jim Meyering <address@hidden> wrote:
> On Tue, Nov 18, 2014 at 3:18 PM, Norihiro Tanaka <address@hidden> wrote:
>> On Tue, 18 Nov 2014 09:26:26 -0800
>> Jim Meyering <address@hidden> wrote:
>>> Condensing your example, and being careful to run on a system for
>>> which such a locale is actually installed (check via "locale -a|grep
>>> -i jis"; I had to adjust the locale name on this debian unstable
>>> system). Before the patch:
>>>
>>>   $ printf '\203AA\n'|LC_ALL=ja_JP.SHIFT_JIS src/grep -qF A||echo fail
>>>   fail
>>>
>>> After the patch, it matches and the above command prints nothing.
>>>
>>> This is a good argument for making the test framework work harder
>>> to find a locale like that, and if not found, to suggest how to install
>>> it, so the test is not skipped so often.
>>
>> Thanks for the review.
>>
>> I tested on CentOS which did not have SHIFT_JIS locale by default.  So I
>> added it before the test.  However, we can determine the name arbitrarily.
...

Once I had installed the locale used by that test and fixed the bug mentioned
here, I was dismayed to see that the newly-enabled sjis-mb test was
still failing.
The attached patch fixes that.

None of the three changes since the latest snapshot merits another test release,

      tests: big-match: disable OOM-provoking subtest
      tests: sjis-mb: remove now-obsolete and failing sub-tests
      grep -F could erroneously fail to match in non-UTF8 multibyte locales

so I hope to tag/release grep-2.21 some time this weekend.

Attachment: 0001-tests-sjis-mb-remove-now-obsolete-and-failing-sub-te.patch
Description: Binary data


--- End Message ---

reply via email to

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