actualbudget / actual

A local-first personal finance app
https://actualbudget.org
MIT License
12.51k stars 954 forks source link

fix: use Unicode-aware SQLite LIKE filtering #2903

Open dymanoid opened 1 week ago

dymanoid commented 1 week ago

Fixes: #2755, #2347

This PR changes the behavior of the LIKE SQLite queries. Instead of using the built-in implementation that can run in case-insensitive mode only for ASCII characters (and thus performs case-sensitive comparison for all other, like Cyrillic, diacritic, accents etc), the new implementation is based on JS regex that handles all characters in Unicode.

netlify[bot] commented 1 week ago

Deploy Preview for actualbudget ready!

Name Link
Latest commit 2de35106548fc476e548b909f79b378bae4f08f9
Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/6683d37dd7bcb4000845d575
Deploy Preview https://deploy-preview-2903.demo.actualbudget.org
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

github-actions[bot] commented 1 week ago

Bundle Stats — desktop-client

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
9 4.77 MB 0%

Changeset

No files were changed

View detailed bundle breakdown
**Added** No assets were added **Removed** No assets were removed **Bigger** No assets were bigger **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- static/js/resize-observer.js | 18.37 kB | 0% static/js/indexeddb-main-thread-worker-e59fee74.js | 13.5 kB | 0% static/js/BackgroundImage.js | 122.29 kB | 0% static/js/narrow.js | 75.96 kB | 0% static/js/usePreviewTransactions.js | 790 B | 0% static/js/AppliedFilters.js | 27.22 kB | 0% static/js/wide.js | 272.68 kB | 0% static/js/ReportRouter.js | 1.23 MB | 0% static/js/index.js | 3.02 MB | 0%
github-actions[bot] commented 1 week ago

Bundle Stats — loot-core

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
1 1.13 MB → 1.13 MB (+273 B) +0.02%
Changeset File | Δ | Size ---- | - | ---- `packages/loot-core/src/platform/server/sqlite/unicodeLike.ts` | 🆕 +824 B | 0 B → 824 B `packages/loot-core/src/platform/server/sqlite/index.web.ts` | 📈 +105 B (+1.98%) | 5.18 kB → 5.29 kB `packages/loot-core/src/server/aql/compiler.ts` | 📈 +20 B (+0.06%) | 35.21 kB → 35.23 kB
View detailed bundle breakdown
**Added** No assets were added **Removed** No assets were removed **Bigger** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.js | 1.13 MB → 1.13 MB (+273 B) | +0.02% **Smaller** No assets were smaller **Unchanged** No assets were unchanged
MatissJanis commented 1 week ago

cc @No898 @mioiox could either of you confirm is this PR patches your issue. Thanks

psybers commented 1 day ago

@MatissJanis I can confirm it works for the examples given in the two linked issues.