Re: quoted form of POSIX path
Re: quoted form of POSIX path
- Subject: Re: quoted form of POSIX path
- From: Jonathan Levi MD <email@hidden>
- Date: Tue, 5 Aug 2003 01:45:15 -0400
At 12:01 AM +0100 8/5/03, John Delacour wrote:
'as string' is a very bad idea in OS X. The Finder and the shell
talk Unicode.
You may get a list of trues when you run this script, but that's
only because you've selected a file with a 'convertible' name. As
soon as you select a file with any other character in it, you'll get
one or two falses.
tell application "Finder"
set f to item 1 of (get selection)
set a to quoted form of POSIX path of (f as Unicode text)
set b to quoted form of POSIX path of (f as file specification)
set c to quoted form of POSIX path of (f as alias)
set d to quoted form of POSIX path of (f as string)
{a = b, a = c, a = d}
--> {true, true, false}
end tell
And so it was, when I created and selected a folder whose name had
Hebrew characters. O sagacious one!
_______________________________________________
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.