Closed Bug 294050 Opened 20 years ago Closed 20 years ago

Search in history is case-sensitive for non-ascii letters

Categories

(Firefox :: Bookmarks & History, defect)

defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: da_neil, Assigned: jruderman)

Details

(Keywords: fixed1.8, intl, Whiteboard: Steps to reproduce in comment 5 (ISO-8859-1).)

Attachments

(1 file, 2 obsolete files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 Search in history do distinguish between uppercase and lowercase non-english letters. This bug make difficulties for searching words and search will produce non-complete results for users not knowing about this bug. Reproducible: Always Steps to Reproduce:
Confirming bug with trunk build from 20050513 on Win XP.
Severity: major → normal
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: intl
Version: unspecified → Trunk
Can I request a blocker?
Severity: normal → major
Version: Trunk → 1.5 Branch
Will this bug be fixed or the new Fx *again* will be bundled with *one more* broken feature?
Daniel, can you add specific steps to reproduce? (What language is involved, what pages to visit, what to search for.)
I'm not Daniel, but... Steps to reproduce: 1. Visit http://www.fyndborsen.se/ 2. Open History and type in "fyndb" in the search field. 3. Press Alt+0246 to create a "ö" (latin small letter o with diaeresis) 4. Notice how the entry "FYNDBÖRSEN - Hemelektronik på internet sedan 1997" does not match. 5. Delete the "ö" and press Alt+0214 to create "Ö" (latin capital letter o with diaeresis) and notice the match.
Thanks. I can reproduce the bug using Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a1) Gecko/20051006 Firefox/1.6a1.
Whiteboard: Steps to reproduce in comment 5
Whiteboard: Steps to reproduce in comment 5 → Steps to reproduce in comment 5 (ISO-8859-1).
nsGlobalHistory::RowMatches uses nsCaseInsensitiveCStringComparator, which is for comparing ASCII strings. According to bug 231782, implementing nsCaseInsensitiveUTF8StringComparator would not be trivial. I will try to fix this bug by using UTF-16 or UCS2 instead of UTF-8 in nsGlobalHistory::RowMatches, since nsCaseInsensitiveStringComparator takes UTF-16 or UCS2.
But there is a working search field in the Bookmarks sidebar. Wouldn't it be easy just to "copy" its behaviour?
Attached patch patch (obsolete) — Splinter Review
Attachment #198916 - Flags: superreview?(bzbarsky)
Attachment #198916 - Flags: review?(mconnor)
Attached patch patch (obsolete) — Splinter Review
Attachment #198916 - Attachment is obsolete: true
Attachment #198917 - Flags: superreview?(bzbarsky)
Attachment #198917 - Flags: review?(mconnor)
Attachment #198916 - Flags: superreview?(bzbarsky)
Attachment #198916 - Flags: review?(mconnor)
Assignee: nobody → jruderman
Version: 1.5 Branch → Trunk
*** Bug 311660 has been marked as a duplicate of this bug. ***
Comment on attachment 198917 [details] [diff] [review] patch >+ const nsString searchText = term->text; Make that |const nsString& searchText| perhaps? sr=bzbarsky with that.
Attachment #198917 - Flags: superreview?(bzbarsky) → superreview+
Neil, Ctho, does the other global history need a similar change?
> >+ const nsString searchText = term->text; > Make that |const nsString& searchText| perhaps? term->text is an nsXPIDLString, so I think |const nsXPIDLString& searchText| would be more clear. |const nsString& searchText| does work (and avoid copying the string buffer) but relies on the fact that nsXPIDLString is a subclass of nsString.
Attached patch patchSplinter Review
This patch declares searchText as |const nsXPIDLString&|.
Attachment #198917 - Attachment is obsolete: true
Attachment #198947 - Flags: superreview?(bzbarsky)
Attachment #198947 - Flags: review?(mconnor)
Attachment #198917 - Flags: review?(mconnor)
(In reply to comment #13) >Neil, Ctho, does the other global history need a similar change? Almost certainly, which is why I created bug 311660...
Attachment #198947 - Flags: superreview?(bzbarsky) → superreview+
Attachment #198947 - Flags: review?(mconnor) → review+
Checked in on trunk.
Status: NEW → RESOLVED
Closed: 20 years ago
OS: Windows XP → All
Hardware: PC → All
Resolution: --- → FIXED
On trunk?? Does that mean it won't be fixed for 1.5?? >:-E
Verified: * [Mac, Win] The fix works as advertised in today's trunk nightlies using normal History sidebar search. * [Mac] All History sidebar modes still work (except for "By Site", which has been broken for ages, see bug 206927). * [Win] The fix works as advertised using the "Enhanced History Manager" extension. * [Win] The "Enhanced History Manager" extension still works. I tested all search mode combinations ("title starts with", etc) and all grouping options. The only oddity I found was that "location is not http://steelgryphon.com/blog/?p=62" caused the remaining items to be re-sorted, but that happens in a trunk build from last week too. * [Mac] The "How'd I Get Here" extension still works.
Attachment #198947 - Flags: approval1.8rc1?
I think this bug makes history search pretty broken in some languages, so I'm requesting approval for Firefox 1.5 RC 1.
Flags: blocking1.8rc1?
Attachment #198947 - Flags: approval1.8rc1? → approval1.8rc1+
plussing since we approved this patch.
Flags: blocking1.8rc1? → blocking1.8rc1+
Checked in on MOZILLA_1_8_BRANCH.
Keywords: fixed1.8
Component: History → Bookmarks & History
QA Contact: history → bookmarks
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: