Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter SixFile Functions (continued)

EncodeURIComponent Function

Overview

The EncodeURIComponent function takes an incoming string and encodes it for transmission as part of a URN query.

Syntax/Parameters

Syntax

string = EncodeURIComponent ( string source );

Parameters

source

A string containing data to be encoded. The string cannot be larger than 8,192 characters.

Return Value

A string containing the encoded version of source or an empty string on failure. Use the GetLastError function to retrieve error information.

Remarks

The EncodeURIComponent function encodes only components; only sections of a query can be encoded because otherwise the delimiters would also be encoded resulting in an improperly formatted query. It is up to the script to assemble the components into the query. The following characters are encoded: $ & + , / \ : ; = ? @ < > # % space (0x20), and any code less than 0x1F or greater than 0x7F.

The resulting string can potentially be three times the size of the source to a maximum if 32,768 characters. If the source string is larger than 1024 characters, consider using POST style URL queries rather than GET style.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic