58.151 URL_ENCODE Function (Deprecated)
Note:
This API is deprecated and will be removed in a future release.
Use the UTL_URL.ESCAPE function instead.
The following special characters are encoded as follows:
Special After
Characters Encoding
% %25
+ %2B
space +
. %2E
* %2A
? %3F
\ %5C
/ %2F
> %3E
< %3C
} %7B
{ %7D
~ %7E
[ %5B
] %5D
; %3B
? %3F
@ %40
& %26
# %23
| %7C
^ %5E
: %3A
= %3D
$ %24
Syntax
APEX_UTIL.URL_ENCODE (
p_url IN VARCHAR2)
RETURN VARCHAR2;
Parameters
Parameter | Description |
---|---|
p_url |
The string to be encoded. |
Example
The following example shows how to use the URL_ENCODE
function.
DECLARE
l_url VARCHAR2(255);
BEGIN
l_url := APEX_UTIL.URL_ENCODE('http://www.example.com?id=1&cat=foo');
END;
In this example, the following URL:
http://www.example.com?id=1&cat=foo
Would be returned as:
http%3A%2F%2Fwww%2Eexample%2Ecom%3Fid%3D1%26cat%3Dfoo
Parent topic: APEX_UTIL