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 set Reference to bz45070.
bzimport added a subscriber: Unknown Object (MLST).

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 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!

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?

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

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)

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 claimed this task.

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