Sorting names with extended character in tags

General discussions
Locked
genesys87
Posts: 14
Joined: Tue Oct 05, 2010 5:20 am

Sorting names with extended character in tags

Post by genesys87 »

If the artist name begins with Ä, in g-que it appears as the last artist, while in Nautilus the folder beginning with Ä is with folders beginning with A.
I think that Nautilus sorting (ie: vowels with strange accents should be treated like normal vowels) is more intuitive.
User avatar
anonbeat
Posts: 2048
Joined: Thu Sep 16, 2010 9:47 pm

Sorting names with extended character in tags

Post by anonbeat »

I agree with you. This is something that sqlite need to solve. I do a query 'SELECT * FROM songs ORDER BY song_artist' and the result should be sorted correctly.

Thanks for your help
genesys87
Posts: 14
Joined: Tue Oct 05, 2010 5:20 am

Sorting names with extended character in tags

Post by genesys87 »

Mmmh, maybe you can further sort the result of the query with some function... but I don't know if this would require too much cpu or time...
genesys87
Posts: 14
Joined: Tue Oct 05, 2010 5:20 am

Sorting names with extended character in tags

Post by genesys87 »

I looked in the sqlite online documentation; it seems that you can decide the collation to use in the ORDER BY clause: http://www.sqlite.org/lang_select.html#orderby
Here is documentation about the collations in sqlite: http://www.sqlite.org/datatype3.html#collation
Here is the documentation about how to define a new collation (sqlite support only three types of collations...): http://www.sqlite.org/c3ref/create_collation.html
gobater
Posts: 25
Joined: Mon Jul 04, 2011 4:42 am

Sorting names with extended character in tags

Post by gobater »

Hi,

I think I've also written something related to this topic some weeks ago, but my post somehow disappeared.

SQLite provides the ability to link against external Unicode comparison and conversion routines (see: http://www.sqlite.org/faq.html#q18)

It will be a great feature if Guayadeque could overload the Sqlite builtin 'collatin sequence'.
This way there wouldn't be any difference among: 'a', 'A', 'á', 'Á', 'à', 'À', ...
For the case with the "Umlauts" more complicated rules should be used: 'ä', 'Ä', 'ae', 'AE' and maybe also 'a', 'A',

Anon, what do you think about this?
User avatar
anonbeat
Posts: 2048
Joined: Thu Sep 16, 2010 9:47 pm

Sorting names with extended character in tags

Post by anonbeat »

I will try to solve this with a configurable filter so other languages can redefine the rules too. Right now Im on the new interface design.

Thanks for your help
gobater
Posts: 25
Joined: Mon Jul 04, 2011 4:42 am

Sorting names with extended character in tags

Post by gobater »

Hi Anon,

A configurable filter sounds really great!
Looking forward to see the new interface

Thank you!
Locked