Bug 123363 - "echo Y | grep -i '[y,Y]'" doesn't return anything (UTF-8)
"echo Y | grep -i '[y,Y]'" doesn't return anything (UTF-8)
Product: Fedora
Classification: Fedora
Component: grep (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Mike McLean
Depends On:
  Show dependency treegraph
Reported: 2004-05-17 13:48 EDT by Robert Scheck
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version: 2.5.1-27
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-05-18 12:14:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
grep-non-utf8.log (2.08 KB, text/plain)
2004-05-17 13:50 EDT, Robert Scheck
no flags Details
grep-utf8.log (1.89 KB, text/plain)
2004-05-17 13:50 EDT, Robert Scheck
no flags Details

  None (edit)
Description Robert Scheck 2004-05-17 13:48:59 EDT
Description of problem:
UTF-8 enabled:
--- snipp ---
[robert@tux robert]$ export LANG=de_DE.UTF-8      # this is also RH default
[robert@tux robert]$ echo Y | grep -i '[y,Y]'
[robert@tux robert]$  
--- snapp ---

UTF-8 disabled:
--- snipp ---
[robert@tux robert]$ export LANG=de_DE.iso88591   # alternative: de_DE@euro
[robert@tux robert]$ echo Y | grep -i '[y,Y]'
[robert@tux robert]$  
--- snapp ---

The behaviour without (!) UTF-8 is correct...so there's something
going wrong :-(

Version-Release number of selected component (if applicable):
grep-2.5.1-7 (and maybe before, too) up to grep-2.5.1-26

How reproducible & Steps to Reproduce:
Everytime, see above.

Actual results:
It seems so, that there's a problem at grep using UTF-8...for 
debugging I attached you two strace logs.

Expected results:
Using "echo Y | grep -i '[y,Y]'" with any locale and charset ;-)

Additional info:
This issue is also affected to Fedora Core 1, Fedora Core 2 and
Red Hat Enterprise Linux 3, I only reported it to Fedora Core devel,
because it's the active development tree.
Comment 1 Robert Scheck 2004-05-17 13:50:24 EDT
Created attachment 100274 [details]
Comment 2 Robert Scheck 2004-05-17 13:50:47 EDT
Created attachment 100275 [details]
Comment 3 Tim Waugh 2004-05-18 12:14:20 EDT
Fixed package is grep-2.5.1-27.  Thanks for reporting it.
Comment 5 Dennis Gregorovic 2005-05-19 23:25:55 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.