URL_ENCODE

Syntax

URL_ENCODE(<URL string>)

Description

Encodes a string. The default for <character_encoding:string> is UTF-8.

When encoding a string, the following rules apply:

  • The alphanumeric characters "a" through "z", "A" through "Z" and "0" through "9" remain the same.
  • The special characters ".", "-", "*", and "_" remain the same.
  • The space character " " is converted into a plus sign "+".
  • All other characters are unsafe and are first converted into one or more bytes using some encoding scheme. Then each byte is represented by the 3-character string "%xy ", where xy is the two-digit hexadecimal representation of the byte.

Examples

Column1URL_ENCODE returns
http://google.com/http%3A%2F%2Fgoogle.com%2F
http://www.datameer.com/product/index.htmlhttp%3A%2F%2Fwww.datameer.com%2Fproduct%2Findex.html
http://www.datameer.com/Datameer-trial.html  http%3A%2F%2Fwww.datameer.com%2FDatameer-trial.html