Encodes strings for use with HTTP. This is also known as URL encoding.
SyntaxHTTP_ENCODE( string )
Parametersstring Arbitrary string to be encoded for HTTP transport.
ReturnsLONG VARCHAR or LONG NVARCHAR
RemarksThis function returns the string argument after making the following set of substitutions. In addition, all characters with hexadecimal codes less than 20 or greater than 7E are replaced with %nn, where nn is the character code.
| Character | Substitution |
|---|---|
| space | %20 |
| " | %22 |
| # | %23 |
| % | %25 |
| & | %26 |
| , | %2C |
| ; | %3B |
| < | %3C |
| > | %3E |
| [ | %5B |
| \ | %5C |
| ] | %5D |
| ` | %60 |
| { | %7B |
| | | %7C |
| } | %7D |
| character codes nn that are less than 0x20 and greater than 0x7f | %nn |
This function supports NCHAR inputs and/or outputs.
See also
Standards and compatibilitySQL/2008 Vendor extension.
ExamplesSELECT HTTP_ENCODE('/opt&id=123&text=''oid:c\x09d ef''') |
![]() |
Discuss this page in DocCommentXchange.
|
Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0 |
