Sybernet / Supplied Procedures Reference
Release 3.00
Oct 14, 2002
backwards forwards

HTTP.URLENCODER

This procedure URI Encodes a string parameter. Anything in the Direct or Search argument that is not a letter, digit, or underscore should probably be encoded. URI Encoding simply replaces that character with a percent sign followed by its two character Hexadecimal representation; for example, the Hexadecimal value for an Ascii double-quote is 22. The URI Encoding of an Ascii quote is therefore "%22."

noteThis function is deprecated in favor of the <URLEncode> tag.

Syntax

Procedure URLENCODER
(
    STRING                    OUT VARCHAR2
)   ;

Parameters

Parameter Description
string
 
The string to be URI Encoded.

Example 1

The following example illustrates how to call urlencoder:

declare
    var varchar(255) := '"Apples and Oranges"';
begin
    http.urlencoder(var);
    http.write(var);
end;


-------------------------------------
%22Apples+and+Oranges%22

Example 2

The following example illustrates how not to call urlencoder:

http.write
(
    '<URLEncode>'
,   '"Apples and Oranges"'
,   '</URLEncode>'
)   ;


-------------------------------------
%22Apples+and+Oranges%22



Sybernet is a trademark of SRI International.
Copyright © 1996-2009 SRI International. All Rights Reserved.
Denis D. Workman / http://Sybernet.sri.com/