Alphabetic order of non-English tags

Bug #309394 reported by J. Pablo Fernández
30
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Exaile
Fix Released
Medium
Bburst
exaile (Ubuntu)
Fix Released
Undecided
Andrew Starr-Bochicchio

Bug Description

The ordering of authors is not correct. In the main window it seems it's done converting the characters to numbers directly, so that Á comes after Z, instead of just being a variant of A.
See attached screenshot.

Revision history for this message
J. Pablo Fernández (pupeno) wrote :
Revision history for this message
Steve Dodier-Lazaro (sidi) wrote :

Hi,

This is more upstream, i've got the same problem with xfce4-menu-plugin, which I don't think to be written in Python. Maybe the Exaile developers can name the method they use for sorting the authors' name, so that someone (me, if I can manage to) can find the time to investigate the actual problem.

Cordially, SD.

summary: - Ordering of authors is not correct
+ Alphabetic order of non-English tags
Revision history for this message
Johannes Sasongko (sjohannes) wrote :

I'm almost sure there was another bug about this, but I can't find it. Anyway, I've attached a possible fix; could anyone try this and see that it doesn't break anything?

Changed in exaile:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Bburst (bbaiyfb) wrote :

I tried your patch and it doesn't break anything as far as I tested.
It is not enough to fix the bug, though.
I made a few additional changes that seem to do the trick.
The patch contains the patch I provided for bug #387025 (I don't know if it matters).

Revision history for this message
Steve Dodier-Lazaro (sidi) wrote :

Similar issues need to be identified and fixed in the 0.3 branches. Assigning to the bug day.

Changed in exaile:
assignee: nobody → Exaile Bug Day Events (exaile-bugday)
Changed in exaile (Ubuntu):
status: New → Confirmed
Revision history for this message
Steve Dodier-Lazaro (sidi) wrote :

The bug is in xl/trackdb.py:82

The list of tuples is sorted without using locale.strxfrm, but I don't know how to apply the function to the strings in each tuple.

Changed in exaile:
milestone: none → 0.3.0
Revision history for this message
Bburst (bbaiyfb) wrote :

How is my patch in comment #4 not already a solution to this bug?

Revision history for this message
reacocard (reacocard) wrote :

> How is my patch in comment #4 not already a solution to this bug?

You patch is very unclean, it has a lot of random additions and removals that make me leery. It's also fairly old now. If you feel you still have a solution, please rebase your patch on trunk and remove the crap from it before you submit again.

Revision history for this message
Bburst (bbaiyfb) wrote :

Randoms additions and removals were trailing spaces that I removed out of habit.
Here is an up to date version (doesn't change anything actually).

Revision history for this message
Mathias Brodala (mathbr) wrote : Re: [Bug 309394] Re: Alphabetic order of non-English tags

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi.

Bburst, 29.07.2009 22:11:
> Randoms additions and removals were trailing spaces that I removed out of habit.
> Here is an up to date version (doesn't change anything actually).
>
> ** Attachment added: "patch.diff"
> http://launchpadlibrarian.net/29677717/patch.diff

Does not work properly for me, or at least not the way I expect it to.
It makes one album starting with "す" (Su) placed in the middle of "T"
and another one, also starting with "す" in the middle of "O". Japanese
characters are not placed based on their Romaji conversions in general.

But everything else in the lower Unicode area seems to work.

I guess there’s nothing else we can do about this without creating
Python bindings to Kakasi.

Regards, Mathias

- --
debian/rules
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkpwtUAACgkQYfUFJ3ewsJj6awCfaX8ihIT5nlqo2p6yske4cpCN
1dYAoJ3p1vE/5ijMpDVapeAhVmNN9rsM
=TdZZ
-----END PGP SIGNATURE-----

Revision history for this message
Bburst (bbaiyfb) wrote :

Hi,

Comparisons are made using strcoll and strxfrm, and I believe it should work correctly with japanese (as long as your locale is set to japanese), but I am clearly not an expert on the subject.
What I expected you to say when I started reading your message was that a group was created for each (leading) japanese syllable. Doesn't it happen?

Revision history for this message
reacocard (reacocard) wrote :

> Randoms additions and removals were trailing spaces that I removed out of habit.

that should be done in separate patches in the future. mixing corrections in one patch is a really good way to not get your patch included. :)

> Comparisons are made using strcoll and strxfrm, and I believe it should work correctly with japanese (as long as your locale is set to japanese)

But only if the locale is set? That's not ideal, since people from one locale are fairly likely to have tracks from other locales in their list. (eg. anime fans are likely to have Japanese music.) We need something that orders it correctly independent of current locale, if at all possible. If such a thing doesn't exist, then I have no further objections to this patch.

Revision history for this message
Steve Dodier-Lazaro (sidi) wrote :

But the order differs depending on your locale.

Revision history for this message
Bburst (bbaiyfb) wrote :

> But only if the locale is set? That's not ideal, since people from one locale are fairly likely to have tracks from
> other locales in their list. (eg. anime fans are likely to have Japanese music.) We need something that orders it
> correctly independent of current locale, if at all possible. If such a thing doesn't exist, then I have no further
> objections to this patch.

What I meant was there is no reason why the ordering should be correct in a language if you don't set your locale accordingly.
For example, I want to have "LL" < "LO". Spaniards may wish, I assume, the opposite ordering, since LL is a letter that comes after L in the alphabet.

> But the order differs depending on your locale.

Right.

Revision history for this message
Steve Dodier-Lazaro (sidi) wrote :

The patch works but it shows another issue : horizontal rules are drawn between albums beginning with the same letter each time this first letter has an accent. We will write a proper fix that includes this problem for 0.3.0.1 Thanks for your patch, Bburst.

Changed in exaile:
milestone: 0.3.0 → 0.3.0.1
Revision history for this message
Bburst (bbaiyfb) wrote :

Can you give your example showing the bug? I have the last revision, and it seems to work fine : Early Days, L'eau, Émilie Simon, Empathy and there are no rules in between (neither for album list nor artist list).

Revision history for this message
Steve Dodier-Lazaro (sidi) wrote :

It's actually happening with some special characters (that are not used for
the sorting itself). I don't know what's happening to me but I keep writing
stupid things in this bug report. Attaching a screenshot.

Changed in exaile:
status: Confirmed → In Progress
Revision history for this message
Steve Dodier-Lazaro (sidi) wrote :
Revision history for this message
Bburst (bbaiyfb) wrote :

Okay, that's fixed.

Revision history for this message
Steve Dodier-Lazaro (sidi) wrote :

Wow, you're reactive. The case with quotes in the name is fixed with this last patch, but there still are special symbols that seem to resist. Do you think there can be a way to work around the one in the last screenshot i'm attaching ?

Revision history for this message
Bburst (bbaiyfb) wrote :

I was reactive because the fix involved added 10 characters or so...
I don't really know if it can be worked around, because I don't know why the name is sorted there. Are the triangle and brackets ignored when sorting, or is the triangle actually used?
I'm going to look at that.

Revision history for this message
Steve Dodier-Lazaro (sidi) wrote :

The triangle and brackets are ignored, and 'triangle' is used for sorting.
The two towers is turned into 'two towers' for sorting so it's logically
after, but the rules still get drawn between triangle and The two towers.

Revision history for this message
Bburst (bbaiyfb) wrote :

You can try this patch, but it forces categories for 0 and the 26 letters of the latin alphabet. So that's not good with other alphabets.

Also, I tried with one other symbol and exaile behaves wierdly (independently from my patch). When you quit and launch exaile, the symbol disappears from the name of the album (and comes back when you force reading from the files).
In this case, is your counterexample really valid, or is it a bug somewhere else ?

Revision history for this message
Johannes Sasongko (sjohannes) wrote :

I think we can use isalnum() or something to check for the first sort character.

Revision history for this message
Johannes Sasongko (sjohannes) wrote :

Never mind, seems like it already does that for the sorting, but just
not for the grouping.

Revision history for this message
reacocard (reacocard) wrote :

retargeting to 0.3.0.2

Changed in exaile:
milestone: 0.3.0.1 → 0.3.0.2
Revision history for this message
Steve Dodier-Lazaro (sidi) wrote :

That patch just does the job for me.

Revision history for this message
Johannes Sasongko (sjohannes) wrote :

Thanks, I've committed it to trunk and the 0.3.0 branch.

Changed in exaile:
assignee: Exaile Bug Day Events (exaile-bugday) → Bburst (bbaiyfb)
status: In Progress → Fix Committed
Changed in exaile (Ubuntu):
status: Confirmed → Triaged
reacocard (reacocard)
Changed in exaile:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package exaile - 0.3.0.2-0ubuntu1

---------------
exaile (0.3.0.2-0ubuntu1) lucid; urgency=low

  * New upstream bug-fix release:
   - The contextinfo plugin now works with newer
     versions of webkit. (LP: #427064)
   - A bug in the collection panel affecting expansion
     of items containing quote marks was fixed.
   - Non-ascii characters are now ordered correctly in
     the collection panel. (LP: #309394)
  * debian/patches: Remove un-needed series file. We use simple-patchsys.
 -- Andrew Starr-Bochicchio <email address hidden> Mon, 09 Nov 2009 23:09:35 -0500

Changed in exaile (Ubuntu):
status: Triaged → Fix Released
Changed in exaile (Ubuntu):
assignee: nobody → Andrew Starr-Bochicchio (andrewsomething)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.