Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter SixFile Functions (continued)

GetMappedTextEncodingString Function

Overview

The GetMappedTextEncodingString function returns the encoding of a Mapped Text Object as a string.

Syntax/Parameters

Syntax

string = GetMappedTextEncodingString ( handle hMappedText );

Parameters

hMappedText

A handle to a valid Mapped Text or Edit Object.

Return Value

Returns a string specifying the encoding of the mapped text object or an empty string on failure. Use the GetLastError function retrieve error information.

Remarks

The possible return values are as follows:

'no encoding' No encoding detected, ANSI
'UNICODE' UNICODE (Little Endian)
'UNICODE (Big Endian)' UNICODE (Big Endian)
'UNICODE (UTF-8)' UTF-8

 

Note that UTF-8 will not have the MTE_UNICODE flag set since the characters are 8-bit. When a file is encoded as UTF-8, it is up to the script to read text and then decode it as required.

If the hMappedText parameter is invalid, the GetLastError function will return ERROR_INVALID_HANDLE.

Related Functions

Platform Support

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

Legato IDE, Legato Basic