Bug 123363

Summary: "echo Y | grep -i '[y,Y]'" doesn't return anything (UTF-8)
Product: [Fedora] Fedora Reporter: Robert Scheck <redhat-bugzilla>
Component: grepAssignee: Tim Waugh <twaugh>
Status: CLOSED ERRATA QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 2.5.1-27 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-05-18 16:14:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
grep-non-utf8.log
none
grep-utf8.log none

Description Robert Scheck 2004-05-17 17:48:59 UTC
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]'
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 17:50:24 UTC
Created attachment 100274 [details]
grep-non-utf8.log

Comment 2 Robert Scheck 2004-05-17 17:50:47 UTC
Created attachment 100275 [details]
grep-utf8.log

Comment 3 Tim Waugh 2004-05-18 16:14:20 UTC
Fixed package is grep-2.5.1-27.  Thanks for reporting it.

Comment 5 Dennis Gregorovic 2005-05-20 03:25:55 UTC
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.

http://rhn.redhat.com/errata/RHBA-2005-449.html