Skip to content

Accounts with non-ASCII names display at the bottom - ordering issue #2239

Closed

Description

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

  1. Create accounts with names that start with non-ASCII letters
  2. 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    fixedBugs that are fixed (in a coming release).

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions