It is currently Tue May 26, 2020 6:49 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Two General Sorting Bugs in One, may be not Win only
PostPosted: Sun Jul 13, 2014 2:02 am 
Offline
User
User

Joined: Wed Feb 27, 2013 9:36 am
Posts: 58
1. No Sort_NoCase sorting for Cyrillic languages like Russian (and may be for non-Cyrillic tongues as well)
2. Order of precedence between otherwise identical upper and lower case strings (like cod and COD, fab and Fab, etc) is changing each time such comparison occurs (which, among other things, doesn't comply with dictionary sorting standards).

Described here:
http://www.purebasic.fr/english/viewtopic.php?f=13&t=59888

_________________
Coding's men's knitwork.


Last edited by staringfrog on Sun Jul 13, 2014 4:40 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Two General Sorting Bugs in One, may be not Win only
PostPosted: Sun Jul 13, 2014 3:53 am 
Offline
Addict
Addict
User avatar

Joined: Mon Jul 25, 2005 3:51 pm
Posts: 3679
Location: Utah, USA
staringfrog wrote:
1. No Sort_NoCase sorting for Cyrillic languages like Russian (and may be for non-Cyrillic tongues as well)
2. Order of precedence between otherwise identical upper and lower case strings (like cod and COD, fab and Fab, etc) is changing each time such comparison occurs (which, among other things, doesn't comply with dictionary sorting practice).

Described here:
http://www.purebasic.fr/english/viewtopic.php?f=13&t=59888


1. Confirmed results (though probably not a bug). PureBasic only does #PB_Sort_NoCase correctly with respect to ASCII range values (0 - 127). Itwould be a feature request to have it include Unicode characters also. If it hasn't been requested yet, please request it, it would be very helpful. This is also related to the commands UCase() and LCase() only working with ASCII range values.
2. There is no order of precedence between uppercase and lowercase if the #PB_Sort_NoCase is used (see notes regarding #1).

_________________
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Two General Sorting Bugs in One, may be not Win only
PostPosted: Sun Jul 13, 2014 11:14 am 
Offline
Always Here
Always Here

Joined: Fri Oct 23, 2009 2:33 am
Posts: 6176
Location: Wales, UK
Quote:
This is also related to the commands UCase() and LCase() only working with ASCII range values.

....they seem to work fine with Unicode, including languages such as Russian, Serbian etc. Important to use a font that supports the characters, such as Microsoft Sans Serif (not the same as MS Sans Serif).

_________________
IdeasVacuum
If it sounds simple, you have not grasped the complexity.


Top
 Profile  
Reply with quote  
 Post subject: Re: Two General Sorting Bugs in One, may be not Win only
PostPosted: Sun Jul 13, 2014 11:22 am 
Offline
Addict
Addict

Joined: Thu Jun 07, 2007 3:25 pm
Posts: 3845
Location: Berlin, Germany
IdeasVacuum wrote:
Quote:
This is also related to the commands UCase() and LCase() only working with ASCII range values.

....they seem to work fine with Unicode, including languages such as Russian, Serbian etc.

Maybe on Windows (I didn't check that e.g. for Russian).
But certainly not on Linux and Mac OS.

_________________
Please excuse my flawed English. My native language is PureBasic.
Search
RSBasic's backups


Top
 Profile  
Reply with quote  
 Post subject: Re: Two General Sorting Bugs in One, may be not Win only
PostPosted: Sun Jul 13, 2014 4:16 pm 
Offline
User
User

Joined: Wed Feb 27, 2013 9:36 am
Posts: 58
Guys,

First. All things described here as a bug occur 1) both in ASCII and in Unicode, with proper compiler settings, 2) with proper Unicode fonts set for PB GUI and PB Debugger, when tested for Unicode (which is not necessary, but anyways).

Second.
According to PB Help, "#PB_Sort_NoCase sorts the string array without case sensitive (a=A, b=B etc..)" What it actually does with Russian strings both in ASCII and Unicode is A-Z then a-z sorting, which by no means qualifies as a case-insensitive sorting routine! In other words, Sort_NoCase flag simply doesn't work.

Third. Sort_NoCase doesn't mean upper and lower case equivalents constantly trading places in output, does it? Never have seen such a thing in languages other than PB. What I call 'an order of precedence' is nothing but just some logical, purely conventional order of queuing (which is expected when strings are sorted with their cases ignored) and not its total absence, as we find here.

All in all, you must admit that the 'sorting quarters' of Pure Basic are purely abysmal, for a language that is being developed over a decade. Limiting what one might call a basic operation with strings and arrays to 3 flags (Up, Down, and NoCase that doesn't work as expected) in times when natural sorting and other fancy things are commonplace and can be found in every web application, not to mention desktop programming! No excuse.

_________________
Coding's men's knitwork.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye