|
|
osascript, shebang, and unicode arguments
Your first script works, your second does not. Here is what I am talking about. (I just figured-out how to use Polish characters on this site.) Suppose I have this directory:
~/Ł And I choose it with your first script:
See the c5 81 in the hexdump? That is the UTF-8 for "LATIN CAPITAL LETTER L WITH STROKE". Replacing "choose folder" with "choose file" in your script does the right thing for files too. But what is the point of a shell script that makes you choose the files one by one in a dialog box, I want them from the command line and besides the arguments need not be files, but simply strings.
Now I have a file DŁN.JPG and your second script has this output:
See the hex e2 89 88 c3 85, that is all messed-up, since my encoding is macroman. Also the text is munged in the dialog box itself. The hint offers a way for passing arguments to an AppleScript from the command line without arguments with international characters such as Ł getting munged.
osascript, shebang, and unicode arguments
The point is to use them as building blocks for more complicated GUI scripting. By themselves, they aren't worth much. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|