Open Bug 1297691 Opened 8 years ago Updated 2 years ago

nsFind should use locale-aware comparisons for case-insensitive matching

Categories

(Core :: Find Backend, defect)

defect

Tracking

()

People

(Reporter: jfkthame, Unassigned)

References

Details

Currently, the Find code does "generic" case-insensitive comparison, which is OK much of the time, but yields unexpected results in some cases (e.g. Turkish).

With case sensitivity ON, a search for "i" will match "i" only, as expected.

However, with case sensitivity OFF, a search for "i" will match "i" or "I" (as expected for most locales) and also "İ" (somewhat surprising, though in Turkish this would be the correct uppercase -- and "I" should not have matched). Oddly, though, while "i" matches both "I" and "İ", it still doesn't match "ı".

Conversely, a search for "ı" never matches any uppercase letter, even when case sensitivity is turned off.

The expected behavior when searching Turkish content would be for "i" to match either itself or "İ", and for "ı" to match either itself or "I".

(Bug 202251 is aiming to improve Find behavior using code based on ICU Collators. Once that lands, we should look into using locale-appropriate collators to further improve the behavior.)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.