Page 1 of 1

UTF-8 sort filter order

Posted: Tue Sep 19, 2017 2:48 am
by dfhtextpipe
In the Sort filter, selecting UTF-8 sort (case-sensitive) , it makes no difference whether or or not you tick Descending order.

Ascending sort doesn't work! It gives the output in Descending order.

Code: Select all

Ascending sort UTF-8 sort (case sensitive), start column 8, length 80

Code: Select all

Descending sort UTF-8 sort (case sensitive), start column 8, length 80
Best regards,

David

Re: UTF-8 sort filter order

Posted: Thu Sep 28, 2017 12:18 am
by dfhtextpipe
This bug is not fixed in TextPipe v 10.4.

UTF-8 sort ascending doesn't work. It still does a descending sort!

I urgently await your response.

David

Re: UTF-8 sort filter order

Posted: Thu Sep 28, 2017 12:22 am
by dfhtextpipe
Temporary workaround until you fix the issue.

Include a Reverse line order filter after the sort if you want an ascending order.

David

Re: UTF-8 sort filter order

Posted: Fri Sep 29, 2017 10:08 pm
by dfhtextpipe
Help for a numeric sort states:
Numeric sort allows lines to be sorted according to their numeric value. The numeric value must appear at the start of the line (leading spaces are allowed). The number must be in decimal, and can be in floating point format. Any non-numeric characters after the number are ignored. If the line has no valid numeric value it is given a value of 0. If you have dates formatted in YYYYMMDDHHMMSS order you can easily sort by date based on the value.
If the numeric value must appear at the start of the line, then why allow specifying the Start column for this sort type?

I suspect the help text has not taken into account that the start column can be other than 1.

Even so, I think this filter doesn't work properly as a numeric sort when the start column is greater than 1.
I think it reverts to a string sort rather than a sort based on numerical value.

David

Re: UTF-8 sort filter order

Posted: Thu Oct 12, 2017 6:52 am
by DataMystic Support
Fixed UTF-8 case-sensitive sort for the next release.

Re: UTF-8 sort filter order

Posted: Tue Oct 17, 2017 8:05 pm
by DataMystic Support
I have updated the help.

But I checked this filter with list of

Code: Select all

   8.3
   8.2
   8.0
   5
   4
   3
   2
   1
with a Ascending numeric sort, remove duplicates, start column 3, length 4096

output is

Code: Select all

   1
   2
   3
   4
   5
   8.0
   8.2
   8.3
looks fine to me. Do you have a test case?

Re: UTF-8 sort filter order

Posted: Sat Oct 21, 2017 12:33 am
by dfhtextpipe
Create some data with a fixed length word preceding the numbers.

Code: Select all

test8.9
test6.9
test10.5
test2
test-1
Then set the starting column as 5 and see what happens.

Replace the word test with random 4 digits, and see if the results change.

Re: UTF-8 sort filter order

Posted: Mon Oct 23, 2017 7:22 am
by DataMystic Support
Sorting that text alone gives the corect answer:

Code: Select all

test-1
test2
test6.9
test8.9
test10.5
If I change the input text to:

Code: Select all

45238.9
11116.9
962310.5
87122
0034-1
it gives the correct output of

Code: Select all

0034-1
87122
11116.9
45238.9
962310.5
Myth Busted? Happy for more test data