Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Case-insensitive search in unicode text doesn't work #4826

Closed
arturslo opened this issue Nov 25, 2021 · 3 comments
Closed

Case-insensitive search in unicode text doesn't work #4826

arturslo opened this issue Nov 25, 2021 · 3 comments

Comments

@arturslo
Copy link

Bug description

When searching for text лариса expected it to match Лариса Короткина
When searching equals text лариса expected to match Лариса

The issue is u (unicode modifier) is not used in preg_* functions.
In equality test strtolower function is used, instead of Str::lower() which uses mb_strtolower to handle unicode.

Part of this is issue was already once mentioned #4284

How to reproduce

Issue reproduced in added test cases
https://github.com/arturslo/cms/tree/issue/search-unicode

Some passing tests as proof that unaccepted pull request would fix issues with preg_* functions
https://github.com/arturslo/cms/tree/issue/search-unicode-apply-pull-request-4284

Run modified test classes
./vendor/bin/phpunit --filter CombTest
./vendor/bin/phpunit --filter QueryBuilderTest

Logs

No response

Versions

PHP 8.0.12
laravel/framework v8.73.2
statamic 3.2

Installation

Other (please explain)

Additional details

Just executed added tests on statamic/cms fork

@cfreak
Copy link
Contributor

cfreak commented Dec 15, 2021

Some problem for me..

Is there already a workaround?

@htulibacki
Copy link

This bug still exists in Statamic 3.4.5.

@duncanmcclean
Copy link
Member

duncanmcclean commented Jan 8, 2024

Closing in favour of #3315, which looks to be the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants