Special characters in plug-in actions parameters

Hi,

This question can probably be answered only by Peter Lewis.

I have written several plug-in actions (the OmniFocus action pack). Here is my question:

  • When I pass a string containing emojis to my script (AppleScript) as a plug-in parameter, it doesn't seem to work.
  • When I pass the same string using a standard variable that I get using getvariable, it works (the string with the emoji is correctly initialized in the AppleScript).

Are the methods to get a string using "system attributes" vs "getvariable" different? Is there a reason why I am able to get the value properly only using getvariable?

As described in the Execute an AppleScript action, the AppleScript command system attribute is not safe for international characters.

Only Apple knows why that command remains stuck in the '90s…

OK, thank you Peter, I'll try to find a workaround for that specific issue.

Other than your original work around of getvariable, the other option is documented in the help:

set myVar to do shell script "echo $KMVAR_My_KM_Variable"

That should work for international characters.

5 posts were split to a new topic: AppleScripts vs Shell Scripts