GNOME Bugzilla – Bug 662426
case insensitive search is not case insensitive
Last modified: 2011-10-22 12:49:53 UTC
Created attachment 199703 [details] [review] Fix case insensitive searching. Search::search_notes() has an bool argument for determining if the search should be case sensitive. This is passed along to Search::check_note_has_match() and Search::find_match_count_in_note() where the actual searching is done. When this argument (case_sensitive, or match_case) is false, the note text is converted to lower case before searching. However, the search terms should also be converted to lower case to truly make this case insensitive. For example, with the current code and case_sensitive=false, "foo" would match both "Foo" and "foo". However, "Foo" would match neither "Foo" nor "foo". The attached patch will also convert the search terms to lower case when appropriate.
The simpler way is to lowercase the query at the beginning of search_notes() if case_sensitive is false. This problem has been fixed in our software repository. The fix will go into 0.7.6 and 0.8.1 releases. Thank you for your bug report.