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

[Bug]: String normalization doesn't properly handle Polish "ł" #3449

Open
2 tasks done
EvidentlyCube opened this issue Sep 15, 2024 · 0 comments
Open
2 tasks done

[Bug]: String normalization doesn't properly handle Polish "ł" #3449

EvidentlyCube opened this issue Sep 15, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@EvidentlyCube
Copy link

Verified issue does not already exist?

  • I have searched and found no existing issue
  • I will be providing steps how to reproduce the bug (in most cases this will also mean uploading a demo budget file)

What happened?

String normalization while filtering allows Actual to ignore diacritic characters. If I have a category Pączek I can find it when adding a transaction by typing either or pa which improves usability. This works for almost all characters in Polish language with the exception of ł:

Works with ł at the end:
image

But not l at the end:
image

As a Polish native I can confirm that being able to use l to find ł (in this context) an expected behavior.


The reason this doesn't work out of the box is because string normalization can only remove diacritics from Latin characters and ł (as well as its upper case variant) are a distinct character rather than latin+diacritics. A few other languages will likely have similar issues with their characters like German ß=ss or Norwegian ø=o. It gets even more problematic for cases like ü which in some languages it can be u and in others ue (wiki source).

A solution similar to this SO answer could be used but it doesn't help with u/ue. An alternative would be to have a dedicated compareStrings() function which checks both "romanizations" but it greatly increases the computational cost of comparison and with enough variations it becomes unfeasible to check all combinations.

Where are you hosting Actual?

Locally via Yarn

What browsers are you seeing the problem on?

Firefox

Operating System

Linux

@EvidentlyCube EvidentlyCube added the bug Something isn't working label Sep 15, 2024
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

No branches or pull requests

1 participant