Home >

Requirements

  • Mac OS X 10.4 or later
    • Developed and tested on Mac OS X 10.5.8/10.6.8/10.8.5

Download

Version 1.4.1 -- 2016-02-07

URI Escape.osax

"URI Escape.osax" is a scripting addition to percent escape and unescape a string (especially URI).

You may have seen a string like "%E3%82%82%E3%81%97%E3%82%82%E3%81%97.png". Characters for URI (URL) are limited to subset of ascii characters, therefore other characters (ex. 2 byte characters) are expressed using "% + hex number" form. The expression "% + hex number" is called as "percent escape". "URI Escape.osax" is a scripting addition to encode strings into percent escaped form and decode it.

By the way, my English ability is very poor. I hope somebody make a correction into this document.

set escaped_text to URI Escape "あいうえお"
--> "%E3%81%82%E3%81%84%E3%81%86%E3%81%88%E3%81%8A"
log (URI Unescape escaped_text)
--> "あいうえお"

set a_uri to URI Escape "file:///Users/tkurita/ファイル.txt"
--> "file:///Users/tkurita/%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB.txt"
URI Unescape a_uri
--> "/Users/tkurita/ファイル.txt"

History

  • 1.4.1 -- 2016-02-06
    • Added support of Garbage Collection.
  • 1.4 -- 2012-06-12
    • Added "URI Escape version" command.
  • 1.3.3 -- 2010-12-11
    • Re-supported Mac OS X 10.4.
  • 1.3.2 -- 2010-08-26
    • Improved internal code.
    • The installer was built with PackageMaker.
  • 1.3.1/1.2.3 -- 2009-11-13
    • Fixed a problem that the dictionary can not be opened.
  • 1.3/1.2.2 -- 2009-10-16
    • Full supported Mac OS X 10.6
  • 1.2.1 -- 2009-10-08
    • Supported of 64 bit.
  • 1.2 -- 2009-08-19
    • Added encoding option.
    • Improved error handling.
    • Thanks to Andrey Kazak for many suggestions and testing.
  • 1.1.2 -- 2007.01.20
    • Fixed crashing when empty strings are given as argurments.
  • 1.1.1 -- 2006.11.16
    • Fixed a bug of crashing when unescaping a URL of which the sheme is "file" and the host is empty.
  • 1.1r2 -- 2006.07.18
    • Added English document
  • 1.1 -- 2006.04.18
    • Changed product name from URL Unescape to URI Escape
    • Added URI Escape command.
  • 1.0 -- 2006.01.09
    • First release.