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

Searching for text including letters with diacritics can provide unexpected results #142

Closed
danelkay93 opened this issue Jan 8, 2025 · 0 comments · Fixed by #143
Closed
Labels
bug Something isn't working

Comments

@danelkay93
Copy link
Contributor

Describe the bug
Searching with diacritics in text data does not match letters without diacritics in search queries. For example, searching "Kohaku" by name or card text returns no results, while searching "Kōhaku" returns the intended card. The letter 'ō' itself seems to exhibit undefined behavior or acts as a "wildcard".

To Reproduce
Steps to reproduce the behavior:

  1. Go to the search bar.
  2. Enter a search query with a letter without diacritics, e.g., "Kohaku".
  3. Observe that no results are returned.
  4. Enter a search query with a letter with diacritics, e.g., "Kōhaku".
  5. Observe that the intended result is returned.
  6. Enter 'ō' as a standalone search query and observe its behavior.

Expected behavior
Diacritics should be stripped from all letters in text that is being searched as well as any search queries. Any letter with diacritics in either case should always match the same letter without any diacritics. This will not affect the results or output displayed to the user.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment

  • Version [2.7.0]

Additional context
This issue is addressed in a Pull Request that adds logic to normalize diacritics in search queries and searchable text, ensuring that users can find their desired results even if they forego the appropriate diacritics on characters, and vice versa.

@danelkay93 danelkay93 added the bug Something isn't working label Jan 8, 2025
danelkay93 added a commit to danelkay93/arkham.build that referenced this issue Jan 8, 2025
fix: Improve search by normalizing diacritics (fspoettel#142)

Resolves fspoettel#142

This commit improves search functionality by
normalizing diacritics in search queries and
searchable text. This ensures that users can
find items even if they use characters with
diacritics, and vice versa.

- Added `normalize-text` library
- Normalized diacritics in card search
- Normalized diacritics in combobox
- Normalized diacritics in deck filters
```
danelkay93 added a commit to danelkay93/arkham.build that referenced this issue Jan 8, 2025
fix: Improve search by normalizing diacritics (fspoettel#142)

Resolves fspoettel#142

This commit improves search functionality by
normalizing diacritics in search queries and
searchable text. This ensures that users can
find items even if they use characters with
diacritics, and vice versa.

- Added `normalize-text` library
- Normalized diacritics in card search
- Normalized diacritics in combobox
- Normalized diacritics in deck filters
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant