• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: quoted form of POSIX path
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
References: 
 >Re: applescript-users digest, Vol 3 #1900 - 16 msgs (From: "Jonathan Levi, M.D." <email@hidden>)
 >Re: quoted form of POSIX path (was: .. digest, Vol 3 #1900 (From: John Delacour <email@hidden>)

  • Prev by Date: Re: $HOME/.login
  • Next by Date: Re: compress with resource forks
  • Previous by thread: Re: quoted form of POSIX path (was: .. digest, Vol 3 #1900
  • Next by thread: iCal Scripting: Any Caveats?
  • Index(es):
    • Date
    • Thread