AppleScriptでJavaScriptを使わずにURLエンコードする。Perl, Ruby set theText to "http://ja.wikipedia.org/wiki/ アップルスクリプト " --Perl set theURL to do shell script "perl -MURI::Escape -wle 'print uri_escape(\"" & theText & "\")'" log "2=" & theURL (*2=http%3A%2F%2Fja.wikipedia.org%2Fwiki%2F%E3%82%A2%E3%83%83%E3%83%97%E3%83%AB%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88*) --perl set theURL to do shell script "perl -MEncode -MURI::Escape -e 'print uri_escape(encode('utf8', decode('utf8', \"" & theText & "\")))'" log "3=" & theURL (*3=http%3A%2F%2Fja.wikipedia.org%2Fwiki%2F%E3%82%A2%E3%83%83%E3%83%97%E3%83%AB%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88*) --ruby --AppleScript : URL エンコード http://blog.goo.ne.jp/vallie/e/26f5d6333f44e071863c173300865306 set theURL to do shell script "ruby -r cgi -e 'puts CGI.escape(\"" ...