Page MenuHomePhabricator

Wikitable sortable - capital letters sort both before and after small ones
Closed, ResolvedPublic

Description

Capital letters sometime sort before and sometime after small ones.

Example here: http://cs.wikipedia.org/wiki/Wikipedista:Kozuch/Sorting

Current situation: A,a,b,B,C,c

Desired order: A,a,B,b,C,c
OR
a,A,b,B,c,C

Details

Reference
bz45070

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:32 AM
bzimport added a project: MediaWiki-JavaScript.
bzimport set Reference to bz45070.
bzimport added a subscriber: Unknown Object (MLST).
Kozuch created this task.Feb 16 2013, 10:43 AM
TheDJ added a comment.Jul 18 2013, 1:40 PM

By default, tablesorter text parser is doing a case insensitive compare. So the result of what you see, can be explained by the initial position of the characters in the table.

Iodel claimed this task.Oct 15 2016, 11:21 AM
Iodel added a subscriber: Iodel.

I'd like to take on that task.

@Iodel: This issue has been assigned to you a year ago.
Could you please share a status update? Are you still working (or still plan to work) on this issue? Is there anything that others could help with? If you do not plan to work on this issue anymore, please remove yourself as assignee (via Add Action...Assign / Claim in the dropdown menu) so others could work on it. Thanks a lot!

Krinkle removed a subscriber: Krinkle.Oct 9 2017, 10:14 PM
Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptOct 9 2017, 10:20 PM
Aklapper removed Iodel as the assignee of this task.Oct 9 2017, 10:50 PM
Dvorapa added a subscriber: Dvorapa.EditedJan 7 2019, 2:40 PM

We use and have set Unicode collation for Categories (uca-cs for Czech Wikipedia). This is already configured for majority of Wikipedias. Why don't we use the same here?

Restricted Application added a subscriber: Urbanecm. · View Herald TranscriptJan 7 2019, 2:40 PM
Dvorapa added a comment.EditedJun 6 2019, 3:11 PM

By default, tablesorter text parser is doing a case insensitive compare. So the result of what you see, can be explained by the initial position of the characters in the table.

Yes, but it produces not a good result, for example this is table-sorted:
á
A
a
b
B
C
c
Č
č
ď
d
Ď
It is a complete mess

TheDJ added a comment.Jun 6 2019, 9:18 PM

Yes i know.

TheDJ added a comment.Jun 15 2019, 7:29 PM

Right I remember now. This is of course because otherwise a, sorts after capital Z, which is even less desirable. Therefor, this is dependent on localeCompare, like T32674: Use sort collation config in JavaScript (jquery.tablesorter)

Dvorapa added a comment.EditedJun 15 2019, 9:25 PM

I see. But I doubt there is not any external library, that could handle this

Change 517266 had a related patch set uploaded (by TheDJ; owner: TheDJ):
[mediawiki/core@master] Tablesorter: Use localeCompare

https://gerrit.wikimedia.org/r/517266

Change 517266 merged by jenkins-bot:
[mediawiki/core@master] Tablesorter: Use localeCompare

https://gerrit.wikimedia.org/r/517266

TheDJ closed this task as Resolved.Jul 19 2019, 8:39 AM
TheDJ claimed this task.

This should now be fixed (if your browser supports locale compare for the language of your wiki)