From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.5) Gecko/20031007 Description of problem: Now, if the pattern contains uppercase chars the text is not matched; if the text contains uppercase chars they are coerced to lowercase in the output! Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. echo ab | grep -i -o ab 2. echo AB | grep -i -o ab 3. echo ab | grep -i -o AB 4. echo AB | grep -i -o AB Actual Results: 1. ab 2. ab 3. 4. Expected Results: 1. ab 2. AB 3. ab 4. AB Additional info: http://savannah.gnu.org/patch/?func=detailitem&item_id=1940 seems to have a correct fix (tested)
Created attachment 96344 [details] patch from Google cache of grep CVS archive (since Savannah is down - cracked)
Patch doesn't work. Case (2) gives no output.
Red Hat 8.0 glibc 2.3.2-4.80.6 kernel 2.4.20-20.8 i686: patch -d src < 96344.patch patch -p1 < grep-2.5-i18n.patch ./configure --without-included-regex && make all cases pass
No, try with current fedora/development package. Case (2) fails.
ok, if you apply the patches in the spec file; then apply the attached patch; then comment out the body of your 2.5.1-oi patch - all cases pass. the gofast patch currently fails without your oi patch.
What do you mean by 'comment out the body'?
the -oi patch only adds lines to grep.c. i mean comment out the lines it adds (after applying all patches) - 543-574 in grep.c.
Oh, you mean just don't apply it? Okay, I'll try that.
Nope, patch fails. Try it in a UTF-8 locale.
I fixed it by only setting .translate when MB_CUR_MAX==1.
Fixed package is grep-2.5.1-22.
Tried -23. The patched seemed to work in a UTF-8 locale without your change. Anyway, -23 works fine.
Fedora Core 1 update is grep-2.5.1-17.4. However, this seems to tickle a glibc bug (bug #112869), so rawhide will shortly have another version of this -o -i patch that makes use of RE_ICASE instead. Leaving open for the time being; this is something that would be nice to fix for Red Hat Linux 9 too.
An errata 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-2004-083.html
An errata 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-2004-079.html