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

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

Closed
halilim opened this issue Apr 23, 2019 · 2 comments
Closed

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

halilim opened this issue Apr 23, 2019 · 2 comments
Labels
fixed Bugs that are fixed (in a coming release).

Comments

@halilim
Copy link

halilim commented 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

  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
@JC5
Copy link
Member

JC5 commented Apr 23, 2019

Nice find. That should be an easy fix. Setting the language won't change much I'm afraid, but the sorting can be fixed.

@JC5 JC5 added the bug label Apr 23, 2019
@JC5
Copy link
Member

JC5 commented Aug 1, 2019

Will be fixed in the next release.

@JC5 JC5 added the fixed Bugs that are fixed (in a coming release). label Aug 1, 2019
@JC5 JC5 closed this as completed Aug 9, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jan 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fixed Bugs that are fixed (in a coming release).
Projects
None yet
Development

No branches or pull requests

2 participants