Products Downloads


French version


 


This function allows to encode an URL (escape special characters and spaces).


Note: since the purpose of this function is to encode a complete URL, the following special characters are not encoded: ; , / ? : @ & = + $ #


Context

  • Java client

  • Adelia Web client

  • Adelia Cloud client

  • Event Adelia client
  • Java server


Parameters

ALPHA(n)

URL

Initial URL.

ALPHA(n)

Encoding

URL encoding. If set to *BLANK, it assumes the UTF-8 encoding.

For use with Adelia Cloud and the VaToolBxOpenURL function, use the encoding by default, i. e. UTF-8.

ALPHA(n)

EncodedURL

Encoded URL.

ALPHA(n)

ValueLgth

Length of the EncodedURL variable.

NUM_BIN_4

ReturnCode

Return code for the operation:

 0: operation completed successfully.

-1: encoding error.

-2: the provided variable is too small for storing the result.


Example

URL

= 'http:mydomain.fr?user=Karine Béranger'

Enc

= 'UTF-8'


/* returned value: http:mydomain.fr?user=Karine%20B%c3%a9ranger

CALL_DLL 'VATOOLBX.DLL' 'VaToolBxJavaEncodeURL' URL Enc URL2 256 ReturnCode


List of the VaToolBx functions by topic


↑ Top of page

  • Aucune étiquette