-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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]: Can't use rules to match string fields by a Polish letter if it's at the beginning of a word #840
Comments
This is reproducible on the current edge image. |
👋 Thanks for the bug report. I was able to reproduce it and dug into it a bit. This smells like a case sensitivity bug somewhere. When we query for transactions to display in the table we use a query like this.. So it smells like a bug in |
When I was looking into it, I was unable to reproduce the problem with an analogous query in SQLite Browser on Actual's db file so it would make sense for it to be a better-sqlite3 bug or a misconfiguration. |
My testing confirms that this is an issue with better-sqlite3's behavior: It looks like better-sqlite3 ships with a SQLite3 build without ICU support: |
Good investigation @Jackenmen ! Would you want to pursue this further by opening a ticket with |
I would prefer someone else to pursue it. I'm not sure if there's any chance for this to be improved in |
I imagine ICU support would be very large (I believe Unicode data takes up most of the ~5MB size of SwiftWasm binaries) so perhaps the better option would be to do the case folding in JS? |
After further investigation, I figured that we actually care more about |
…es (#865) Fixes #840 by creating application-defined SQL functions (https://www.sqlite.org/appfunc.html) for Unicode-aware implementations of `LOWER()` and `UPPER()`. This uses `String.prototype.toLower/UpperCase()` JS method. I initially wanted to just redefine `LOWER()` and `UPPER()` but due to [sql.js not supporting the definition of deterministic functions](sql-js/sql.js#551), I had to just define them as separate functions and use that in the appropriate places. It's probably better like that anyway...
…es (actualbudget#865) Fixes actualbudget#840 by creating application-defined SQL functions (https://www.sqlite.org/appfunc.html) for Unicode-aware implementations of `LOWER()` and `UPPER()`. This uses `String.prototype.toLower/UpperCase()` JS method. I initially wanted to just redefine `LOWER()` and `UPPER()` but due to [sql.js not supporting the definition of deterministic functions](sql-js/sql.js#551), I had to just define them as separate functions and use that in the appropriate places. It's probably better like that anyway...
Verified issue does not already exist?
What happened?
I have transactions with an imported payee named "Ing Bank Śląski S.A.". I noticed that it is impossible to match them using
is
against that exact string and I noticed that when usingcontains
instead, it only works as long as I match with anything that doesn't containŚ
, i.e. both "Ing Bank" and "ląski S.A." are matching fine. It seems that the rules in Actual are having trouble with matching string fields by a Polish letter if that letter is the first letter of any word in the field. I've also been able to reproduce this with the "Notes" field.Reproduction steps:
ĄĆĘŁŃÓŚŹŻąćęłńóśźż
What error did you receive?
The relevant transactions do not show up.
Where are you hosting Actual?
Fly.io
What browsers are you seeing the problem on?
Chrome
Operating System
Linux
The text was updated successfully, but these errors were encountered: