Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.4j

Application v 5.22b

  

 

Chapter FiveGeneral Functions (continued)

XMLTextToUTF Function

Overview

The XMLTextToUTF function converts XML character entities to UTF text.

Syntax/Parameters

Syntax

string = XMLTextToUTF ( string data );

Parameters

data

A string to convert.

Return Value

Returns a string containing data converted. Use the IsError and GetLastError functions to retrieve error information.

If the string overflows, the buffer will be clipped near the 2MB limit.

Remarks

The XMLTextToUTF function is meant to process well formed ASCII data from XML. It converts SGML escaped characters (‘<’, ‘>’, and ‘&’) to ANSI and converts all other numeric character entities to UTF-8. This function does not convert HTML named character entities. Erroneous characters will be replaced with ‘?’ characters. See the SGML chapter for a more comprehensive conversion.

The maximum size of the string is 2MB.

Note that the error count will be in the lower portion of the error code returned by the GetLastError function (and & with ERROR_CODE_MASK to remove the error code).

Related Functions

Platform Support

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

Legato IDE, Legato Basic