buggrep - Bugs: bug #36703, Change of behaviour

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #36703: Change of behaviour

Submitted by:  None
Submitted on:  Thu 21 Jun 2012 10:42:19 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Invalid
Privacy: PublicAssigned to: None
Open/Closed: Closed

Fri 10 Aug 2012 12:36:24 PM UTC, comment #1:

The current behavior is correct (and consistent in all locales).

Even though the patch you identified already affected the behavior of UTF-8, commit 2c817e28252c67f50e6b798e4bfe18f9d41020ab then changed the behavior for all multibyte character sets.

Paolo Bonzini <bonzini>
Thu 21 Jun 2012 10:42:19 PM UTC, original submission:

Before 7a0ad00f634237b753572378289d76fa8f1c5942:

$ grep 'foo.*\<bar' /tmp/t
fooxxxxx_bar
$

7a0ad00f634237b753572378289d76fa8f1c5942 and after:

$ src/grep 'foo.*\<bar' /tmp/t
$

(/tmp/t contains only that one line.)

The grep that I built to bisect this links to Ubuntu 10.10's libpcre3, which apt-cache show libpcre3 shows as being:

Architecture: amd64
Source: pcre3
Version: 8.02-1

I'm not sure how relevant pcre is, as I'm not using -P.

I don't feel qualified to determine which of the behaviours is correct, but the reason I hunted down this change in behaviour is that the underscore not forming part of the "word" surprised me.

It turns out also that before 7a0ad00, the output depends on whether I set LC_ALL=C or LC_ALL=en_ZA.utf8; 7a0ad00 and after, the output is empty regardless of which of those two locales I set.

In any case, this change of behaviour seems unrelated to the commit message:

commit 7a0ad00f634237b753572378289d76fa8f1c5942
Author: Paolo Bonzini <bonzini@gnu.org>
Date: Mon Apr 19 14:50:23 2010 +0200

dfa: optimize UTF-8 period

* NEWS: Document improvement.
* src/dfa.c (struct dfa): Add utf8_anychar_classes.
(add_utf8_anychar): New.
(atom): Simplify if/else nesting. Call add_utf8_anychar for ANYCHAR
in UTF-8 locales.
(dfaoptimize): Abort on ANYCHAR.

Submitter: Bernd Jendrissek (not logged in)

Anonymous

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bonzini (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 10 Aug 2012 12:36:24 PM UTCbonziniStatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1