Bug 123363 - "echo Y | grep -i '[y,Y]'" doesn't return anything (UTF-8)
Summary: "echo Y | grep -i '[y,Y]'" doesn't return anything (UTF-8)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: grep
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-05-17 17:48 UTC by Robert Scheck
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version: 2.5.1-27
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-05-18 16:14:20 UTC
Type: ---
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2005:449 0 normal SHIPPED_LIVE Updated grep package 2005-05-19 04:00:00 UTC

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



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