Re: Unicode, AppleScript, and the shell
Re: Unicode, AppleScript, and the shell
- Subject: Re: Unicode, AppleScript, and the shell
- From: John Delacour <email@hidden>
- Date: Fri, 25 Jul 2003 01:08:55 +0100
- Mac-eudora-version: 6.0a28
At 12:55 am +0100 25/7/03, John Delacour wrote:
set s to "qq~\\x{65e5}\\x{672c}\\x{8bed}~"
do shell script "perl -e 'print hello . " & s & "'"
Here's an example that creates a directory named <nihongo/ribenyu> in
your home directory and opens it:
set s to "qq~\\x{65e5}\\x{672c}\\x{8a9e}~"
set _dir to quoted form of (do shell script "perl -e 'print " & s & "'")
do shell script "cd; mkdir " & _dir & "; open " & _dir
But so long as you have the path in the proper form, you don't need
to play with codes at all. Once you have created the folder as
above, you can choose it in a dialog and pass the path to a shell
script, because here you are dealing with UTF-8 and not with UCS-2:
do shell script "open " & quoted form of POSIX path of (choose folder)
JD
.
_______________________________________________
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.