-
-
Notifications
You must be signed in to change notification settings - Fork 834
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
fix: languages with combining characters cannot be searched #3385
Conversation
for the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow... This is kind of staggering, not gonna lie: if this has been the main reason completely breaking UTF-8 search, this might genuinely be one of the most impactful PRs in Flarum history.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only thought: perhaps we should also test that we can search titles for other languages?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least there's tests now 🙈
this will affect also filter options? because actually filter doesn't work with other languages:
|
when you use |
Changes proposed in this pull request:
The regular expression used in the Fulltext search gambit attempts to remove non-words to avoid triggering MySQL boolean mode, however, it also removes special characters that combine with words in languages such as Telugu and Devanagari.
This pull request tweaks the regular expression to take those into consideration and allow searching in those languages. (Before this fix, searching for example for:
नागरी
resulted in actually searching forन गर
)Necessity
Confirmed
composer test
).