Archived Beta Discussions > SlickEdit 2021 v26 Beta Discussion
Sorting order for UTF8 ignores "-"
jporkkahtc:
If I have a buffer with
--- Code: ----band
begin
-bnot
--- End code ---
it sorts differently if it is ACP vs UTF-8
With UTF-8, apparently the leading "-" is ignored.
ACP Ordering:
--- Code: ----band
-bnot
begin
--- End code ---
UTF8 Ordering
--- Code: ----band
begin
-bnot
--- End code ---
Clark:
Interesting. works for a line selection. Also works for the sort-buffer command. Odd when you use a column selection. We will look into this.
not sure how long this has been this way. v25 is the same.
Clark:
I'm not sure this is a bug. SlickEdit is calling the Win32 CompareStringW function which sorts this way. Make a directory and put the following file names in the new directory:
a
b
-c
Notice that the windows file explorer displays the sort order the same as SlickEdit.
Clark:
Decided not to use CompareStringsW. This win32 function seems to always be case insentive which is definitely a bug. Also, SlickEdit file explorer like dialogs already don't use this function for Unicode. Might as well have all platforms do the same thing.
Thanks for noticing this weirdness.
jporkkahtc:
Cool.
So, why would you be using a win32 function for sorting?
Wouldn't you want some portable function?
FWIW, I was just using gui-sort, and sorting the whole buffer.
Navigation
[0] Message Index
[#] Next page
Go to full version