Exporting and encoding an AppleScript
Further to me recent post “A Folder Action to encode a script to be Opened in Editor”, I have updated the GitHub Gist noting that
AppleScript Editor exports a decompiled version of your compiled script which may contain line continuation characters that the Python urllib.parse finds unpalatable. Thus, instead of merely catenating the .AppleScript into the output file, we do `iconv -f iso-8859-1 -t UTF-8 " & scriptInputName ...` to create a UTF-8 file that Python is happy with.