GNU bug report logs - #21989
grep search by ASCII code unsuccessful

Previous Next

Package: grep;

Reported by: Shivanshu Goyal <shivanshu3 <at> gmail.com>

Date: Mon, 23 Nov 2015 07:57:02 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Shivanshu Goyal <shivanshu3 <at> gmail.com>
To: bug-grep <at> gnu.org
Subject: grep search by ASCII code unsuccessful
Date: Sun, 22 Nov 2015 21:24:05 -0800
[Message part 1 (text/plain, inline)]
Hi,

I think I found a bug which did not exist in version 2.14, but does seem to
exist in versions 2.16 and 2.22. I have not tested any other versions.

Say there is a file with the following contents:

shivanshu <at> thetis:tmp$ cat temp | xxd
0000000: 68e2 8093 680a                           h...h.

The following is the grep 2.14 command and output:

shivanshu <at> thetis:tmp$ cat temp | grep -P '\xe2\x80\x93'
h–h

The following is the grep 2.16/2.22 command and output:

shivanshu <at> thetis:tmp$ cat temp | grep -P '\xe2\x80\x93'
d1y8 <at> thetis:tmp$

Thanks,
Shivanshu Goyal
shivanshu.ca
[Message part 2 (text/html, inline)]

This bug report was last modified 9 years and 181 days ago.

Previous Next


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