Also, to use the reserved characters in the name-value pairs of the query string of a URL, those characters must be escaped separately. You should escape characters beyond those listed here by using escape_url. Many of the reserved characters are used as delimiters in the URL. Use this function to escape URLs that contain illegal characters as defined in the URL specification RFC 2396. The character set can be named in Internet Assigned Numbers Authority (IANA) or in the Oracle naming convention. The default value is the current default body character set of the UTL_HTTP package, whose default value is ISO-8859-1. If url_charset is NULL, the database charset is assumed and no character set conversion will occur. When escaping a character (single-byte or multibyte), determine the target character set that character should be converted to before the character is escaped in %hex-code format. Otherwise, only the illegal URL characters are escaped. If set to TRUE, both the reserved and illegal URL characters are escaped. Indicates whether the URL reserved characters should be escaped. Table 180-3 ESCAPE Function Parameters Parameter Table 180-1 lists the exceptions that can be raised when the UTL_URL package API is invoked.
Note that this URL escape and unescape mechanism is different from the x-www-form-urlencoded encoding mechanism described in the HTML specification: Use the unescape function to unescape an escaped URL before information is extracted from the URL.įor more information, refer to the Request For Comments (RFC) document RFC2396. Use the escape function to escape a URL before the URL is used fetch a Web page by way of the UTL_HTTP package. The UTL_URL package has two functions that provide escape and unescape mechanisms for URL characters.
#Url encode for period plus
Semi-colon ( ) slash ( /), question mark ( ?), colon ( :), at sign ( ampersand ( &), equals sign ( =), plus sign ( +), dollar sign ( $), and comma ( ,) ), exclamation point ( !), tilde ( ~), asterisk ( *), accent ( '), left parenthesis ( ( ), right parenthesis ( ) ) To literally process these characters, instead of treating them as delimiters, they must be escaped.Ī through Z, a through z, and 0 through 9 They are known as the reserved characters. Some punctuation characters, such as dollar sign ( $), question mark ( ?), colon ( :), and equals sign ( =), are reserved as delimiters in a URL. Any other characters in URLs, including multibyte characters or binary octet codes, must be escaped to be accurately processed by Web browsers or Web servers. These characters are known as the unreserved characters. Normally, a URL contains English alphabetic characters, digits, and punctuation symbols. For example, the URL for Oracle's Web site is: Use a URL to access such resources by way of the HyperText Transfer Protocol (HTTP). A Uniform Resource Locator (URL) is a string that identifies a Web resource, such as a page or a picture.