Re: Unix file path problems
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.