Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.4j

Application v 5.22b

  

 

Chapter SixFile Functions (continued)

GetMappedTextEncoding Function

Overview

The GetMappedTextEncoding function returns the encoding of a Mapped Text Object as an integer.

Syntax/Parameters

Syntax

dword = GetMappedTextEncoding ( handle hMappedText );

Parameters

hMappedText

A handle to a valid Mapped Text or Edit Object.

Return Value

Returns a 32-bit dword specifying the encoding of hMappedText or a formatted error code. Use the GetLastError function to retrieve additional error information. If the hMappedText parameter is invalid, the function will return ERROR_INVALID_HANDLE.

Remarks

The return value is a bitwise set of flags defined as follows:

MTE_CONTAINS_UNICODE 0x00008000 UNICODE Chars Added/Mapped > 0x00FF
MTE_UNICODE 0x00004000 UNICODE
MTE_BIG_ENDIAN 0x00002000 Big Endian Style
MTE_UTF_8 0x00001000 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.

Related Functions

Platform Support

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

Legato IDE, Legato Basic