JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 10.10.2019, 20:58
kypec kypec is offline
Modem User
 
Join Date: Oct 2019
Posts: 2
Question Weird sorting of filenames

I think there is a bug in sorting algorithm that is used by JD2. Please have a look at how LibreOffice Calc sorts the strings (which represent filenames without extensions)


Highlighted item is 4th in the ascending order and that is correct according to general alphanumeric sorting rules in english.

However, JD2 sorts the filenames in such a way, that the same item (including extension but that is still the same for each file anyway) is placed after the last numeric-starting item 8fdjTFvjR7TWvynjZajw and before alpha-starting item abTcDiAlRfeJ656yEKbN


Can you please explain why is it so?
Attached Images
File Type: png LO Calc sorting.png (460.6 KB, 1 views)
File Type: png JD filename sorting.png (261.2 KB, 3 views)
Reply With Quote
  #2  
Old 11.10.2019, 17:17
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 66,134
Default

That's not a bug.
There are many different sorting algorithms you can use to sort strings and JDownloader
uses NaturalOrder sorting in this situation, which groups *group of numbers*
__________________
JD-Dev & Server-Admin
Reply With Quote
  #3  
Old 11.10.2019, 21:49
kypec kypec is offline
Modem User
 
Join Date: Oct 2019
Posts: 2
Thumbs up

Thanks for your reply. Well, then it would be nice to have some option for choosing regular sorting in addition to this NaturalOrder flavour. You know, all standard office tools like spreadsheets use classic sorting of strings based on local alphabet rules and it would be nice to have aligned results across different applications when one wants to sort "by name".
Reply With Quote
  #4  
Old 11.10.2019, 23:38
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 66,134
Default

__________________
JD-Dev & Server-Admin
Reply With Quote
  #5  
Old 12.10.2019, 12:00
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 16,272
Default

while I agree there should be advanced option to change the type of sorting type, there is no 'regular' sort order. From my experience over the years, nearly exclusively numbers before alphabet in most programs, and real life. When it comes to spread sheets they typically give you options on how you want it sorted.

anyway my 2 cents =]
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]

Last edited by raztoki; 13.10.2019 at 14:39. Reason: typing tired = meh
Reply With Quote
  #6  
Old 13.10.2019, 07:38
guardao's Avatar
guardao guardao is offline
JD-Team
 
Join Date: Mar 2009
Posts: 257
Default

Quote:
Originally Posted by raztoki View Post
while I agree there should be advanced option to change the type of sorting type, there is no 'regular' sort order. From my experience over the years, nearly exclusively its vastly numbers before alphabet in most programs, and real life. When it comes to spread sheets they typically give you options on how you want it sorted.

anyway my 2 cents =]
Live again, great.
Good to know that you still are with us.
Greetings from Europe.
Reply With Quote
  #7  
Old 13.10.2019, 14:42
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 16,272
Default

@Guardao
Thankyou =]
I've been around, just not heavily active due to work and life commitments.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 17:10.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.