specify / specify6

Source Code for Specify 6, Biological Collections Management Platform
https://specifysoftware.org
GNU General Public License v2.0
14 stars 6 forks source link

Fix sorting algorithm #488

Open maxpatiiuk opened 4 years ago

maxpatiiuk commented 4 years ago

I tried to create a data set summary out of one column The column consists of numbers only Currently, it seems like all the rows are sorted by the ASCII code of the characters This creates a problem with cell that have numbers in them There should be different sorting algoritm implemented, where 1 is followed by 2, instead of 10

Screenshot (8) Screenshot (9)

Possible solution - stackexchange.com

maxpatiiuk commented 4 years ago

Also, when I made Specify to display locality names between 100 and 7000, it still displayed the locality names lover than 100. Probably connected to the fact that Specify treats everything as a string, even when it is a signed number or a float

Screenshot (12) Screenshot (13)

maxpatiiuk commented 4 years ago

Sorting with Cyrillic alphabet works more or less fine (Numbers, then English, then Russian)

Here are the problems with the sorting algorithm: Numbers are treated as strings, leading to faulty sorting order Ukrainian characters that are not present in Russian are put between English and Russian alphabets

Screen Shot 2020-04-17 at 3 49 05 PM