Skip to content

qt: Sort playlists with locale's collation rules - #1912

Open
gruenich wants to merge 1 commit into
audacious-media-player:masterfrom
gruenich:feature/sort-locale-collation
Open

gruenich wants to merge 1 commit into
audacious-media-player:masterfrom
gruenich:feature/sort-locale-collation

Conversation

@gruenich

Copy link
Copy Markdown
Contributor

Playlist sorting compared strings byte by byte (folding only ASCII
case), so non-ASCII text ended up in code point order: Chinese was not
sorted by Pinyin, Japanese katakana was separated from hiragana, and
accented Latin letters such as "É" were sorted after "Z".

Last release:
audacious-pre-change

With this patch applied:
audacious-with-change

When built with Qt, compare titles, artists, albums etc. and file names with QCollator for the system locale (LC_COLLATE/LANG). Numeric mode and case insensitivity keep the existing behavior of str_compare() ("Track 2" before "Track 10"), which is also used to break ties so that the order stays deterministic. Builds without Qt keep using str_compare().

Qt fix for #1781

When built with Qt, compare titles, artists, albums etc. and file names
with QCollator for the system locale (LC_COLLATE/LANG). Numeric mode
and case insensitivity keep the existing behavior of str_compare()
("Track 2" before "Track 10"), which is also used to break ties so that
the order stays deterministic. Builds without Qt keep using
str_compare().

Qt fix for audacious-media-player#1781
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant