URL_ENCODE
The URL_ENCODE scalar function completes URL encoding of the provided text using UTF-8 encoding. This is typically used to encode parameter information that is passed as part of the URL.
- character-string
- An expression that returns a built-in character string that is to be encoded.
The result of the function is a varying length character string that contains character-string after being encoded.
Example
- Create a URL that has the parameter encoded for a request to example.com.
ReturnsVALUES 'https://www.example.com/search?q=' CONCAT URL_ENCODE('IBM i Q&A')
https://www.example.com/search?q=IBM+i+Q%26A