ns_urlencode - Encode a string to its URL-encoded representation
This command encodes a string according to the rules for URL encoding defined in RFC #1738, Uniform Resource Locators. ns_urlencode codes essentially all non-alphanumeric characters in the specified components. The epcial octets are encoded by a "%" followed by the two-character hexa- decimal representation for the octet.
The option charset can be used to specify the character set of the encode operation. Option part is used to specify the query (default) or path encoding. In the query mode, the components will be concatenated via "&", in the path mode the components are concatenated with "/".
ns_urlencode http://www.aolserver.com/redirect.adp?url=http://www.aol.com&t=1,2,3
The example outputs the following line
http%3a%2f%2fwww%2eaolserver%2ecom%2fredirect%2eadp%3furl%3dhttp%3a%2f%2fwww%2eaol%2ecom%26t%3d1%2c2%2c3