Re: Unicode, AppleScript, and the shell
Re: Unicode, AppleScript, and the shell
- Subject: Re: Unicode, AppleScript, and the shell
- From: Paul Berkowitz <email@hidden>
- Date: Tue, 22 Jul 2003 15:16:58 -0700
On 7/22/03 2:38 PM, "Sean McBride" <email@hidden> wrote:
>
>
I'm neither a Unicode nor AppleScript expert, so I'm hoping someone here
>
can help me.
>
>
I'm trying to use AppleScript and shell script to manipulate files with
>
non-ASCII characters (Japanese actually). Something like this:
>
>
set command to "/Developer/Tools/MvMac file folder"
>
do shell script command
>
>
If 'folder' has Japanese characters, how do I do this? Simply typing
>
Japanese results in question marks once I hit compile. :(
>
>
Thanks for any pointers!
Don't type it in. Even though you can do this in Script Editor 2.0, the
AppleScript compiler can't deal with it. Instead do:
set theFile to choose file
set theFolder to choose folder
set posixFilePath to quoted form of POSIX path of theFile
set posixFolderPath to quoted form of POSIX path of theFolder
set command to (("/Developer/Tools/MvMac " as Unicode text) & posixFilePath
& " " & posixFolderPath)
do shell script command
If you want to, you can get theFolder the first time and set it as a script
property, then never need to choose it again, if you're always moving files
to that same folder. And if you're getting the files via script, get them as
aliases with hard-coding the names of the files.
--
Paul Berkowitz
_______________________________________________
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.