Functions and CALL Routines |
Returns a string that was decoded using the URL escape syntax.
-
argument
-
specifies a character constant, variable,
or expression.
If the URLDECODE function returns a value to a variable that has not previously
been assigned a length, then that variable is given the length of the argument.
The URL escape
syntax is used to hide characters that might otherwise be significant when
used in a URL.
A URL escape sequence can be one of the following:
-
a plus sign, which is replaced by a blank
-
a sequence of three
characters beginning with a percent sign and
followed by two hexadecimal characters, which is replaced by a single character
that has the specified hexadecimal value.
Operating Environment Information: In operating environments
that use EBCDIC, SAS performs an extra translation step after it recognizes
an escape sequence. The specified character is assumed to be an ASCII encoding.
SAS uses the transport-to-local translation table to convert this character
to an EBCDIC character in operating environments that use EBCDIC. For more
information see TRANTAB= System Option in
SAS National Language Support (NLS): Reference Guide. ![[cautionend]](../../../../common/63294/HTML/default/images/cautend.gif)
SAS Statements |
Results |
x1=urldecode ('abc+def');
put x1;
|
abc def
|
x2=urldecode ('why%3F');
put x2;
|
why?
|
x3=urldecode ('%41%42%43%23%31');
put x3;
|
ABC#1
|
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.