mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-03-02 22:46:56 -05:00
[Bug]: Wrong sort order for Swedish national characters Å, Ä and Ö #2869
Labels
No labels
authentication
awaiting release
backlog
bug
chapter editor
config-issue
ebooks
encoding/embedding
enhancement
help wanted
listening sessions & progress
planned
possible plugin
progress sync
sorting/filtering/searching
unable to reproduce
upload
users & permissions
waiting
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/audiobookshelf#2869
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Cotignac on GitHub (Mar 27, 2025).
What happened?
The alphabetic sort order is wrong for the Swedish national characters.
What did you expect to happen?
The letters from A to Z is correct, but the national characters Å, Ä and Ö is wrong.
I expected them to come in the order like I wrote above Å, Ä, Ö but currently the order is Ä, Å, Ö.
Steps to reproduce the issue
Audiobookshelf version
2.20.0
How are you running audiobookshelf?
Docker
What OS is your Audiobookshelf server hosted from?
Linux
If the issue is being seen in the UI, what browsers are you seeing the problem on?
Edge
Logs
Additional Notes
No response
@advplyr commented on GitHub (Mar 27, 2025):
We are doing case-insensitive sorting so I'm not sure if the lowercase equivalent changes things.
@mikiher and @devnoname120 did a lot of work on unicode, any thoughts?
@Cotignac commented on GitHub (Mar 27, 2025):
I tested to change the spelling of the last name of two authors from a capital Å to å and a capital Ä to ä. Unfortunately that didn't change anything. The order they came in was still ä before å.
@Cotignac commented on GitHub (Mar 27, 2025):
I don't know if it's of any interest, but when I changed from Å to å and from Ä to ä the authors ended up after an author with a last name starting with Ö - the last letter in the Swedish alphabet.
@mikiher commented on GitHub (Mar 27, 2025):
We currently sort using
COLLATE NOCASEfor title/author sort on the library page, which does not work for non-ascii characters reliably.Nunicode supports a non-locale-speciic unicode nocase collation, but even if we switch to that, it might still not correctly sort locale-specific variants like the Swedish example above. I think it may be possible to load locale-specific collations (I need to check), but then we'd need a setting that tells us which locale to use (we can piggyback on display language, but I'm not sure that would be good choice).
Bottom line - I think supporting this properly is complex, and requires more investigation.