UTF-8 sort filter order

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
dfhtextpipe
Posts: 988
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

UTF-8 sort filter order

Post 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
David
dfhtextpipe
Posts: 988
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: UTF-8 sort filter order

Post 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
David
dfhtextpipe
Posts: 988
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: UTF-8 sort filter order

Post 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
David
dfhtextpipe
Posts: 988
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: UTF-8 sort filter order

Post 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
Last edited by dfhtextpipe on Fri Sep 29, 2017 10:56 pm, edited 2 times in total.
David
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: UTF-8 sort filter order

Post by DataMystic Support »

Fixed UTF-8 case-sensitive sort for the next release.
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: UTF-8 sort filter order

Post 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?
dfhtextpipe
Posts: 988
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: UTF-8 sort filter order

Post 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.
David
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: UTF-8 sort filter order

Post 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
Post Reply