Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I am experiencing a bug with the search excerpts being displayed by search API, the bug only occurs with international characters (å,ö,ä) in the case of these characters an excerpt only shows up if the case matches exactly, whereas for standard characters the excerpt is shown even if the case does not match.
Comment | File | Size | Author |
---|---|---|---|
#11 | 2932347-12--fix_case_insensitive_matching_in_php_55.patch | 2.43 KB | drunken monkey |
Comments
Comment #2
drunken monkeyThanks for reporting this issue!
I could have sworn there already was an issue for this, but it seems I was mistaken, since I can't find it anymore. (There was, however, one for Drupal 7, which I had overlooked and found this way, so even better: #2889989: Multi-byte partial-match highlighting is not case-insensitive.)
The attached patch should fix this, please test!
PS: It seems you (like many others – it's really easy to misinterpret) are confused by the "Issue tags" field. As the guidelines state, they aren't meant for free text tags related to the issue, but only for specific categorization purposes, usually by module maintainers.
So, if you aren't sure your current usage is correct, please just leave the field empty.
Comment #4
ghaya CreditAttribution: ghaya commentedThank you! The patch in comment #2 did solve the problem.
Comment #6
drunken monkeyGood to hear, thanks a lot for testing and reporting back!
Committed.
Comment #7
drunken monkeyOops, seems this isn't working on PHP 5.
Comment #9
drunken monkeyOops again.
Comment #10
drunken monkeyHm, maybe the Drupal test bot comes without multi-byte support in its PHP 5 environment?
In any case, it makes sense that we only test this if we expect it to be working – if MB support isn't available in PHP, that's not the fault of our module (I'd say).
Comment #11
drunken monkeyAh, I think I've got it. PHP 5.6 apparently changed the default encoding type to UTF-8, for earlier versions you need to specify it explicitly when calling
mb_stripos()
(and similar functions).Comment #13
drunken monkeyCommitted.