Re: 'sort' command-alternative?
Re: 'sort' command-alternative?
- Subject: Re: 'sort' command-alternative?
- From: Shane Stanley <email@hidden>
- Date: Tue, 08 Oct 2002 17:54:58 +1000
On 8/10/02 4:26 PM +1000, Chris Page, email@hidden, wrote:
>
If the topic is how to sort data, then the format of that data is entirely
>
relevant.
>
Thus my original question -- someone wanted to sort some stuff, someone else
suggested using the sort command, and I was curious about what kind of stuff
it would sort. Because it seemed to me that that the kind of text an AS
scripter is likely to want to sort often consists of classes like plain
text, which I assume is some kind of 8-bit encoding (what I meant by
high-ASCII), and Unicode text, and I wanted to know if they could be handled
by the sort command (via some switch or something).
>
When sorting "text", the encoding, character set, and language of that "text"
>
are the most important things one needs to know. The sorting behavior, or lack
>
thereof, will depend completely upon the contents of the "text" and the
>
capabilities of the software that operates upon it.
>
Yep. I wanted to know if the command would be a useful tool for me. All
these "new OSAX" look great at first, but it looks like there are serious
drawbacks in many cases.
>
For example, if "sort" handles only ASCII characters and your data contains
>
any non-ASCII characters, well, obviously they won't get sorted as desired. If
>
"sort" handles MacRoman, but your "text" is Unicode stored in either UTF-8 or
>
UTF-16, again you may not get the desired results.
>
Exactly the things I wanted to know. And it will it handle plain text that
isn't really?
>
But this is getting too abstract for an AppleScript list, and has little to do
>
with answering the original question, so I'll stop here.
>
I disagree again :-) The whole question of what is meant by text is getting
much more important for scripters, with the emergence of Unicode and the
fact that the underlying OS seems to use different encoding to what we've
become used to. That affects sorting, comparisons -- lots of stuff.
>
It doesn't offend me in the least. It just makes technical communication less
>
clear.
>
And yet everyone seemed to know what was meant ;-)
>
More to the point, assuming that any "text" under discussion consists of
>
MacRoman characters is generally a bug waiting to happen, especially since
>
Unicode use is on the rise.
>
So what strategy do we need to adopt? Seems a pretty important question to
me...
--
Shane Stanley, email@hidden
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.