{{getMsg('Help_YouAreHere')}}: {{page.title}} {{page.title}}

Escape

Encode a string to the "x-www-form-urlencoded" form, enhanced with the UTF-8-in-URL proposal.

This is what happens:

  • The ASCII characters 'a' through 'z', 'A' through 'Z', and '0' through '9' remain the same.
  • The unreserved characters - _ . ! ~ * ' ( ) remain the same.
  • The space character ' ' is converted into a plus sign '+'.
  • All other ASCII characters are converted into the 3-character string "%xy", where xy is the two-digit hexadecimal representation of the character code.
  • All non-ASCII characters are encoded in two steps: first to a sequence of 2 or 3 bytes, using the UTF-8 algorithm; secondly each of these bytes is encoded as "%xx".

Usage:

Escape( x )

Parameters:

x The string to be encoded.

Returns:

The encoded string.

Examples:

Escape ("Peter Schmidt")   // Returns Peter+Schmidt
Escape ("Configuración")   // Returns Configuraci%c3%b3n
Escape ("Friedrichstraße 231, 10969 Berlin")   // Returns Friedrichstra%c3%9fe+231%2c+10969+Berlin

See also: