Georgey wrote:Don't do that. You are not covering all chars that need to be encoded (escaped). Use UTL_URL.Escape().
--Making sure than the spaces in URL are replaced with %20
L_REQ_STRING := REPLACE(L_REQ_STRING,' ','%20');
--Making sure that the URL string is less than 2000 characters
L_REQ_STRING := SUBSTR(L_REQ_STRING,1,1990);
-- Trim the end of the string if it has %20
L_REQ_STRING := RTRIM(L_REQ_STRING,'%20');