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)

Submitted by:  Santiago Ruano Rincón <santiago>
Submitted on:  Mon 02 May 2011 09:50:04 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Jim Meyering <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:

I've posted a patch:

http://thread.gmane.org/gmane.comp.gnu.grep.bugs/3532/focus=3542

Jim Meyering <meyering>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>

 

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

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

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 28 Jun 2011 08:39:22 AM UTCbonziniOpen/ClosedOpen=>Closed
    Sun 19 Jun 2011 01:53:37 PM UTCmeyeringStatusIn Progress=>Fixed
    Sat 07 May 2011 01:43:44 PM UTCmeyeringStatusNone=>In Progress
      Assigned toNone=>meyering
      Open/ClosedClosed=>Open
    Mon 02 May 2011 07:20:15 PM UTCmeyeringOpen/ClosedOpen=>Closed
    Mon 02 May 2011 09:50:04 AM UTCsantiagoCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1