Description
openedon Apr 23, 2019
Bug description
I am running Firefly III version 4.7.17. My account list looks like:
...
Yetc etc
Zetc etc
Çetc etc
Üetc etc
I am using it with English language but with mostly Turkish expense accounts. Ç
should be before Z and after C (and Ü after U etc). I believe this is caused by the use of strtolower
which depends on OS locale.
I have not checked but it seems like a similar issue exists in a few other places where strtolower
is used.
As a note, I believe using DB level orderBy
would fix it, since the default collation of utf8mb4_unicode_ci
on DB works (semi-)correctly when queried directly against the DB. That would also make it possible to change this by modifying the collations of DB columns (e.g. setting it to utf8mb4_turkish_ci in my case which covers EN and TR).
Steps to reproduce
- Create accounts with names that start with non-ASCII letters
- List accounts
Expected behavior
The names should be sorted according to Unicode rules
Extra info
So my instance is deployed on Dokku, and I was able to set the language by dokku config:set app LANG=tr_TR.utf8
. However, this causes other issues (probably related to the "Dotted and dotless I" problem, as it happens in various other places including PHP):
2019-04-23T14:46:55.795935967Z app[web.1]: [Tue Apr 23 17:46:55.794878 2019] [core:alert] [pid 100] [client 172.17.0.1:46494] /var/www/firefly-iii/public/.htaccess: Invalid command '<IfModule', perhaps misspelled or defined by a module not included in the server configuration