ENCODE

(not included in filePro Lite)

v5.7.0 str = ENCODE(str,exp)
  - Converts the text found in the string in exp by method str. The resulting str is returned. Method str must be either "ROT13" or "BASE64"

v6.2 (6.1.02 USP)

Enhanced: Enhanced: Method str can now also be "URL" for URL percent encoding.

Example

Processing:

  Then: a = "this is a test"
  Then: x = ENCODE("ROT13",a)  ' x contains "guvf vf n grfg"
  Then: x = ENCODE("BASE64",a) ' x contains "dGhpcyBpcyBhIHRlc3Q="
  Then: x = ENCODE("URL",a)    ' x contains "this%20is%20a%20test"
	

The ROT13 method is a simple letter substitution cipher, a=n, b=o, c=p, d=q, ..., m=z, n=a, ..., y=l, z=m All numbers and symbols remain unchanged.

The BASE64 method (also known as MIME) was devoloped to allow binary data to be transfered over media that are designed to deal with text data.

The URL method (also known as percent-encoding) is a method to encode data in a uniform resource identifier (URI) using only the US-ASCII characters leagal within a URI.