URLENCODE Function


URLENCODE Function

Returns a string that was encoded using the URL escape syntax

Category: Web Tools

Syntax

URLENCODE ( argument )

Arguments

argument

  • specifies any character expression.

Details

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.

Examples

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  

See Also

Function:

  • 'URLDECODE Function' on page 867




SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 704

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net