Returns a string that was encoded using the URL escape syntax
Category: Web Tools
URLENCODE ( argument )
argument
specifies any character expression.
The URLENCODE function encodes characters that may otherwise be significant when used in a URL. This function encodes all characters except for the following:
all alphanumeric characters
dollar sign ($)
dash (-)
underscore ( _ )
at sign (@)
period (.)
exclamation point (!)
asterisk (*)
left parenthesis ( ( )and right parenthesis ( ))
comma (,).
Note: The encoded string may be longer than the original string. Ensure that you consider the additional length when you use this function.
SAS Statements | Results |
---|---|
x1=urlencode ('abc def'); put x1; | abc%20def |
x2=urlencode ('why?'); put x2; | why%3F |
x3=urlencode ('ABC#1'); put x3; | ABC%231 |
Function:
'URLDECODE Function' on page 867