buggrep - Bugs: bug #33198, Incorrect bracket expression when...

 
 

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

bug #33198: Incorrect bracket expression when parsing in ru_RU.KOI8-R (Russian locale)

Submitter:  Santiago Ruano Rincón <santiago>
Submitted:  Mon 02 May 2011 09:50:04 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  meyering
Open/Closed:  Closed

Thu 02 Jun 2011 08:51:51 AM UTC, comment #3: 

Hi Jim,

It seems the problem is still unsolved. I've tried both, 2.8 and patching 2.7, but I got the same results. Igor Ladygin confirms this.

santiago@nomada:~$ echo Пример| LC_ALL=ru_RU.KOI8-R grep -qE "[Пп]"; echo $?
1
santiago@nomada:~$ echo Sример| LC_ALL=ru_RU.KOI8-R grep -qE "[Ss]"; echo $?
0

Santiago

Santiago Ruano Rincón <santiago>
Sat 07 May 2011 01:43:44 PM UTC, comment #2: 
Jim Meyering <meyering>
Group administrator
Mon 02 May 2011 07:20:15 PM UTC, comment #1: 

Thanks for the report.
however, I cannot reproduce the problem with grep-2.7 built from upstream sources.  Nor can I reproduce it using the grep-2.7 that comes from Fedora 15.

To test it, I put these two lines in a file,

#!/bin/sh
echo Пример| LC_ALL=ru_RU.KOI8-R grep -qE "[Пп]ример"; echo $?

and then ran "bash FILE".  It always prints 1.
(Of course, I set PATH to select either /bin/grep or ./grep,
depending on which I'm testing).

On that basis, I've closed this ticket.
If you have evidence that there's a real problem with the upstream sources, feel free to reopen it.

Jim Meyering <meyering>
Group administrator
Mon 02 May 2011 09:50:04 AM UTC, original submission:  

Hi,

Reported in Debian BTS: http://bugs.debian.org/624387

grep incorrectly parses braket expressions when using a Russian locale:

$echo Пример|grep -qE "[Пп]ример"; echo $?
1

$echo Sример|grep -qE "[Ss]ример"; echo $?
0

While the problem seems to be present in 2.6.3 and 2.7 versions, 2.5.3 works successfully:

$./grep -V
GNU grep 2.5.3

...

$echo Пример|./grep -qE "[Пп]ример"; echo $?
0

It seems to be Ok with UTF-8 too.

Thanks,

Santiago

Santiago Ruano Rincón <santiago>

 

(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 (Updated the item)
  • -email is unavailable- added by meyering (Posted a comment)
  • -email is unavailable- added by santiago (Submitted the item)
  • -email is unavailable- added by santiago
  •  

    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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-06-28 bonzini Open/ClosedOpen Closed
    2011-06-19 meyering StatusIn Progress Fixed
    2011-05-07 meyering StatusNone In Progress
        Assigned toNone meyering
        Open/ClosedClosed Open
    2011-05-02 meyering Open/ClosedOpen Closed
    2011-05-02 santiago Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-0329.
    Corresponding source code