Bug 27587 - Searching for "し" also finds "じ"
Summary: Searching for "し" also finds "じ"
Status: RESOLVED DUPLICATE of bug 30437
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: All OS X 10.5
: P2 Normal
Assignee: Nobody
URL: http://en.wikipedia.org/wiki/Hiragana
Depends on:
Reported: 2009-07-22 17:12 PDT by Justin Garcia
Modified: 2010-01-11 10:41 PST (History)
4 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Justin Garcia 2009-07-22 17:12:49 PDT
Go to http://en.wikipedia.org/wiki/Hiragana
Search for a character

Safari will also highlight the character + dakuten.  For instance if I search for shi (し) Safari will also find ji (じ).
Comment 1 Justin Garcia 2009-07-22 17:24:38 PDT
Some Unicode normalization is going on somewhere.  Seems like n and ñ might reasonably be expected to be equivalent, but not し and じ.
Comment 2 Yuta Kitamura 2009-07-22 18:43:20 PDT
I found that Safari also matches "シ" (Katakana letter shi), "ジ" (Katakana letter ji) and "シ" (Halfwidth katakana letter shi).
Comment 3 Yuta Kitamura 2009-07-22 19:06:53 PDT
Interestingly, Safari (and Chrome) also matches "㋛" (U+32DB, CIRCLED KATAKANA SI).

I bet text find engine uses Unicode Normalization Form KD (NFKD; compatibility decomposition). In fact, when I search for "アパート", Safari matches "㌀" (U+3300, SQUARE APAATO).

I'm not sure whether this behavior should be fixed.
Comment 4 Darin Adler 2009-08-11 11:56:46 PDT
The matching is based on ICU. The folding is due to code in ICU. In the released Safari 4 the behavior is the same no matter what the user’s locale is, but in the TOT WebKit it respects the user’s locale choice so will work differently for different users.

If we don’t like the behavior we can ask ICU to change its behavior, which in some cases would mean changes to the Unicode specification, or we can add workarounds to WebKit’s TextIterator class.
Comment 5 Darin Adler 2009-10-01 12:25:07 PDT
I'm going to close this given that it's behaving as expected. If someone wants to make the case for different behavior, feel free to open a new bug or even open an ICU or Unicode standard bug.
Comment 6 Darin Adler 2010-01-11 10:41:43 PST
I learned more about this topic, and have now decided I was wrong. And I believe I fixed it. See the duplicate bug for details.

*** This bug has been marked as a duplicate of bug 30437 ***