This sounds like the stupidest problem I've ever encountered, but here it is.
I need to use osascript in a shell script of mine to enable ownership on a disk. That's done like so:
Code:
tell application "Finder" to set ignore privileges of disk "My iPod" to false
This works just fine,
except when the disk name contains a fancy apostrophe, namely
which is U+2019 "RIGHT SINGLE QUOTATION MARK" according to UnicodeChecker. The bad news is that this apostrophe is in the default iPod name, such as "Jim’s iPod."
When called from the command line, I get an error like
Code:
29:83: execution error: Finder got an error: Can't set ignore privileges of disk "This guy’s iPod" to false. (-10006)
When run from within ScriptEditor it works just fine.
Is there any way I can get this to work from the command line? Is it an encoding issue?