util.Strings.urlEncode

Converts a string from the current codeset to a URL-encoded string.

Syntax

util.Strings.urlEncode(
  source STRING
 )
  RETURNING result STRING
  1. source is the source string to url-encode.
  2. result is the resulting url encoded string.

Usage

The util.Strings.urlEncode() method converts the character string passed as parameter to a URL-encoded string.

All characters not matching [-_.~a-zA-Z0-9] are "percent encoded": Percent-encoding involves converting those characters to UTF-8 and representing its corresponding byte values by a percent sign ("%") and a pair of hexadecimal digits.

Example

IMPORT util
MAIN
    DISPLAY util.Strings.urlEncode("abcĀ")
END MAIN

Output:
abc%C3%84%E2%82%AC