Bug 4981 - Swedish letters not alphabetized correctly
: Swedish letters not alphabetized correctly
Status: CLOSED WORKSFORME
Product: Logitech Media Server
Classification: Unclassified
Component: Localization
: 6.5.1
: PC Windows XP
: P2 normal with 1 vote (vote)
: ---
Assigned To: Spies Steven
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-05-09 14:29 UTC by Dan Evans
Modified: 2008-12-18 11:12 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Evans 2007-05-09 14:29:55 UTC
(from Support ticket 070508-001913)

In version 6.5.1 of slimserver the handling of Swedish letters Å,Ä and Ö are not correct. Artists begining with letters Å or Ä are listed together with artists begining with the letter A. Artists begining with Ö are listed together with artists bening with the letter O. This also affects the browsing with the remote when jumping directly to the letter B and P. If for example P is pressed on the remote it jumps to artists beginning with the letter Ö. Could not find any information on this in the forum or in the bug report list. Is it a bug?

In slimserver version 6.3.1 it worked almost correctly. However the order of Å and Ä was mixed up.
Comment 1 KDF 2007-05-09 15:06:12 UTC
see bug 4377, possibly related.
anyone tried with 6.5.2?
any use of musicmagic?
Comment 2 Mickey Gee 2007-10-23 12:03:00 UTC
The alphabetization order is determined by the "collation" settings for MySQL. Current version used is 5.0.24a.

http://www.mysql.com/news-and-events/newsletter/2003-04/a0000000148.html

The collation setting is "UTF8", which then determines the country-specific sort order.

http://unicode.org/reports/tr10/

MySQL implements the utf8_unicode_ci collation according to the Unicode Collation Algorithm (UCA) described at http://www.unicode.org/reports/tr10/. The collation uses the version-4.0.0 UCA weight keys: http://www.unicode.org/Public/UCA/4.0.0/al….
	
from http://dev.mysql.com/doc/refman/5.0/en/charset-unicode-sets.html

From Campfire discussion:

Andy G.: so someone has already made that giant text file with the right sorting, but that page goes on to say it's not perfect for every language
Dean B.: ok, so I think that chris should gather more info to see if the sorting is correct per that spec and if that spec is valid for swedish.
Andy G.: it's not valid for swedish
Dean B.:if the user has chosen Swedish as their language, can we tell mysql to localize that way?
Brandon B.:oh yeah, I think at the session level
Dean B.:ok, that should be the solution.
Andy G.:ALTER TABLE `foo` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci
Brandon B.:set collation_connection = 'latin1_swedish_ci'; -- that's correct
Andy G.:is it a database connection option or a table option?
Brandon B.:both I think
Brandon B.:I don't know what implications that has - for instance, I bet the table's one is used in building text indexes, and sorting on that index in nondefault order might be slower
Andy G.: I think we'd want utf8_swedish_ci
Brandon B.:http://www.idig.za.net/mysql-character-set…
Brandon B.: It doesn't say so explicitly, but I still think setting the table as one collation and the connection as another will adversely affect text index sorting performance, given what I can find on the subject.
Andy G.:hey you can change the collation in the actual SQL query
Brandon B.:but again, as above, it probably has to re-sort the index on the fly
Comment 3 Michael Herger 2008-03-13 04:34:05 UTC
I thought this was fixed in 7.0 - can you still see it?
Comment 4 Chris Owens 2008-03-13 14:21:27 UTC
James could I get you to look at this?  Steven may have some files with these characters in the tags, or you can easily make some by cutting and pasting.
Comment 5 James Richardson 2008-03-27 07:38:57 UTC
reassigning to Steven for investigation
Comment 6 Spies Steven 2008-04-02 13:47:16 UTC
II did not realize that the sort order is based on what language is selected in SC not the language and sort order that is selected for the system that SC is running on.  Once I figured that out this appears to be fixed in 7.0.

For example with English selected in SC I get the following sort order:
...
9 AlbumTitle
Ä AlbumTitle     
Å AlbumTitle     
A AlbumTitle
...
O AlbumTitle     
Ö AlbumTitle     
P AlbumTitle
...

and with Swedish selected I get:
...
Z AlbumTitle     
Å AlbumTitle     
Ä AlbumTitle     
Ö AlbumTitle

According to http://en.wikipedia.org/wiki/Swedish_alphabet this is the right sort order.  Resolving as works for me.
Comment 7 James Richardson 2008-05-15 12:59:05 UTC
This bug has recently been fixed in the latest release of SqueezeCenter 7.0.1

Please try that version, if you still see the error, then reopen this bug.

To download this version, please navigate to: http://www.slimdevices.com/su_downloads.html