buggrep - Bugs: bug #30895, match across line using grep can...

 
 

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

bug #30895: match across line using grep can be successful only if user unset $LANG

Submitter:  Zhang Weiwu <zhangweiwu>
Submitted:  Sat 28 Aug 2010 01:45:43 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Wed 22 Dec 2010 02:36:55 PM UTC, comment #3: 

Thanks!

Paolo Bonzini <bonzini>
Wed 22 Dec 2010 02:21:16 PM UTC, comment #2: 

I can now verify with 2.6.3 on Ubuntu 10.10 the same procedure that used to be able to reproduce the misbehavior could not reproduce the misbehavior now, thus I see it ok to close the issue.

Zhang Weiwu <zhangweiwu>
Mon 30 Aug 2010 07:50:14 AM UTC, comment #1: 

I cannot reproduce this.  Your version of grep is likely 2.5.x, because 2.6 was released too close to Ubuntu 10.04.  2.5.x versions of grep were heavily patched by distributions and this sometimes introduced bugs.

Please test with the latest version of grep.

Paolo Bonzini <bonzini>
Sat 28 Aug 2010 01:45:43 AM UTC, original submission:  

reproduced on Ubuntu 10.04 LTS:

almustafa@orphalese:~$ locale
LANG=zh_CN.UTF-8
LANGUAGE=zh_CN:zh
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_ALL=
almustafa@orphalese:~$ printf 'a\nb\0'| grep -z 'a.*b'
almustafa@orphalese:~$ export LANG=
almustafa@orphalese:~$ printf 'a\nb\0'| grep -z 'a.*b'
a
b

In the above case, grep -z 'a.*b' cannot successfully match as it should, but if user unset $LANG, it can.

expected:
  In all locales, grep should be able to match across lines using -z. This command should always produce output:
  printf 'a\nb\0'| grep -z 'a.*b'

Zhang Weiwu <zhangweiwu>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bonzini (Posted a comment)
  • -email is unavailable- added by zhangweiwu (Bob Prolux is the person who recommended me to report the bug in the first place.)
  • -email is unavailable- added by zhangweiwu (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-12-22 bonzini StatusNeed Info Fixed
        Open/ClosedOpen Closed
    2010-12-20 bonzini StatusNone Need Info
    2010-08-28 zhangweiwu Carbon-CopyRemoved zhangweiwu -
    2010-08-28 zhangweiwu Carbon-Copy- Added -email is unavailable-
    2010-08-28 zhangweiwu Carbon-Copy- Added zhangweiwu

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code