Re: Can I Speed Up This Folder Browsing Script?
Re: Can I Speed Up This Folder Browsing Script?
- Subject: Re: Can I Speed Up This Folder Browsing Script?
- From: Doug McNutt <email@hidden>
- Date: Wed, 10 Nov 2004 06:56:11 -0700
At 01:03 -0800 11/10/04, Christopher Nebel wrote:
>On Nov 9, 2004, at 5:28 PM, Mr Tea wrote:
>>In connection with the above, can someone explain to me why the Finder insists on ordering non-alphanumeric characters - eg, bullets (opt+8) and diamonds (opt+shift+v) - before numbers and letters, when virtually everywhere else in OS X (and always in earlier systems) they appear AFTER 0-9 and a-z.
>
>Blame the Unicode Consortium. File names are Unicode, Unicode defines collation order, and one of the collation rules (at least for US English) is that all punctuation comes before all the letters. Any application that does Unicode comparison correctly will produce the same results. If you see something doing the "right" thing, it is in fact probably wrong -- it won't behave correctly with various European locales. I suppose that if you were feeling really clever, you could define a new locale whose sorting was the same as MacRoman, but I don't know how to do that.
I have been frustrated that the UNIX ls command sorts files differently than Finder mostly because Finder treats multi-digit decimal numbers in a non-text way. XX2.jpeg sorts before XX10.jpeg with Finder but it sorts after when ls is used. Finder is particularly annoying when industry standard part numbers like "2N2907.pdf" are used in file names.
Is that also a Unicode thing? I understand that a Linux version of ls has a -f option to handle intelligent sorting of file names that include dotted version numbers but I haven't tried it. I have also tried to find the actual rules used by Finder with no success. Is a decimal point included in the numeric conversion? Does it honor negative numbers?
To be on topic, it's probably possible to get a "correct" ordering of folders with a do shell script operation that uses ls.
An "engineering" locale - hmmm?
--
--> In Christianity, man can have only one wife. This is known as monotony. <--
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden