bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug #33198] Incorrect bracket expression when parsing in ru_RU.KOI8


From: Dmitry V. Levin
Subject: Re: [bug #33198] Incorrect bracket expression when parsing in ru_RU.KOI8-R (Russian locale)
Date: Tue, 3 May 2011 02:03:57 +0400

On Mon, May 02, 2011 at 07:20:15PM +0000, Jim Meyering wrote:
> Update of bug #33198 (project grep):
> 
>              Open/Closed:                    Open => Closed                 
> 
>     _______________________________________________________
> 
> Follow-up 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.

I confirm there is a bug, you just have to adjust the test case:
$ echo Пример |iconv -tutf8 |LANG=ru_RU.utf8 grep -q "$(echo "[Пп]ример" |iconv 
-tutf8)"; echo $?
0
$ echo Пример |iconv -tkoi8r |LANG=ru_RU.koi8r grep -q "$(echo "[Пп]ример" 
|iconv -tkoi8r)"; echo $?
1
$ echo Sример |iconv -tkoi8r |LANG=ru_RU.koi8r grep -q "$(echo "[Ss]ример" 
|iconv -tkoi8r)"; echo $?
0


-- 
ldv

Attachment: pgpN2PBHWfgrf.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]