• 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: Unix file path problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unix file path problems


  • Subject: Re: Unix file path problems
  • From: Walter Ian Kaye <email@hidden>
  • Date: Sun, 27 Jun 2004 17:38:32 -0700

At 12:15a +0100 06/28/2004, Martin Orpen didst inscribe upon an electronic papyrus:

I've got a script that I use to open the Terminal in the directory that I'm
browsing in the Finder:

tell application "Finder"
set myFolder to (target of front window) as string
set pPath to quoted form of POSIX path of myFolder
end tell
tell application "Terminal"
activate
do script "cd " & pPath
end tell

This works fine until you encounter unusual characters in the folder name,
like "" (option-f).

Is there a way of getting these characters interpreted correctly in a POSIX
path?

Well, Terminal *displays* them as "octal Unicode", and that's a conversion which 'quoted form of' does not make. Option-f = \306\222

Bugaboo is that when I've tried typing that in Terminal, it doesn't work; however, if I use tab-completion to enter the same characters, then it works.
I haven't tried 'do script' though, nor quoting the octal-ized path.

I wonder if anyone's written a script to generate the double octals...


-boo
_______________________________________________
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.


  • Follow-Ups:
    • Re: Unix file path problems
      • From: Walter Ian Kaye <email@hidden>
References: 
 >Unix file path problems (From: Martin Orpen <email@hidden>)

  • Prev by Date: Unix file path problems
  • Next by Date: Re: Unix file path problems
  • Previous by thread: Unix file path problems
  • Next by thread: Re: Unix file path problems
  • Index(es):
    • Date
    • Thread