|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
[bug #27919] possible glitch with -i and character classURL: <http://savannah.gnu.org/bugs/?27919> Summary: possible glitch with -i and character class Project: grep Submitted by: None Submitted on: Tue 03 Nov 2009 04:45:17 AM UTC Category: None Severity: 3 - Normal Item Group: None Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any _______________________________________________________ Details: There seems to be some sort of glitch with character classes and the -i (--ignore-case) switch. I am using Mac OS X 10.6.1 (Snow Leopard). grep --version shows v2.5.1. I have not checked the latest grep version. Hopefully you can do that without too much trouble. To reproduce-- Create a text file called "test.txt" that consists of a single line of text with the two letters T and K followed by a unix line feed, as shown below (also see the attached file): TK (I did not attempt to reduce the test case further or see if the particular choice of letters matters.) The case-insensitive search "grep -i [A-Z]K test.txt" finds no matches while the same search done case-sensitively (i.e. without the -i switch) does find a match. See below for a console session that shows a couple other related searches that work. $ grep [A-Z]K test.txt TK $ grep [T]K test.txt TK $ grep -i [T]K test.txt TK $ grep -i [^A-Z]K test.txt TK $ grep -i [A-Z]K test.txt $ I have also e-mailed this information to the bug-gnu-utils address. Thanks, --Chris _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Tue 03 Nov 2009 04:45:17 AM UTC Name: test.txt Size: 3B By: None Test case (one line file with letters T and K) <http://savannah.gnu.org/bugs/download.php?file_id=18981> _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?27919> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ |
|
|
[bug #27919] possible glitch with -i and character classFollow-up Comment #1, bug #27919 (project grep): Sorry for the report, I see now that this was already known and fixed. My report seems to be the same as that reported in Bug 16567: https://savannah.gnu.org/bugs/?16567 I also see the following known bug note in the README for v2.5.4: "The option -i does not work properly in some multibyte locales such as tr_TR.UTF-8 where the upper case and lower case forms of a character are not necessarily of the same byte length." I was able to verify that the issue I reported is not present in version (v2.5.4) as obtained through MacPorts ( http://www.macports.org/ ). Thanks and sorry again! _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?27919> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ |
| Free embeddable forum powered by Nabble | Forum Help |