Products Downloads


French version


 

 

This function allows to encode the value of an URL parameter (escape special characters and spaces).

This function escapes all characters except letters of the Latin alphabet and the following digits and characters: - _ . ! ~ * ' ( ).

 

Context

  • Java client.

  • Web client.

  • Cloud client.

  • Java server.

 

Parameters

ALPHA(n)

Parameter

Value or the URL parameter

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)

EncParameter

Encoded parameter.

ALPHA(n)

ValueLgth

Length of the Parameter variable.

NUM_BIN_4

ReturnCode

Operation return code:

 0: Operation completed successfully.

-1: encoding error.

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

 

For example

Parameter

= '<Karine Béranger> Karine.Beranger@gmail.com'

Enc

- UTF-8

 

* result: %3CKarine%20B%C3%A9ranger%3E%20Karine.Beranger%40gmail.com

CALL_DLL 'VATOOLBX.DLL' 'VaToolBxJavaEncodeURLComponent' Parameter Enc EncParameter 256 ReturnCode

 

URL = 'http://mydomain.com/app?action=checkMail&mail=' /// EncParameter

 

List of the VaToolBx functions by topic

 

↑ Top of page

  • Aucune étiquette