Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.4j

Application v 5.22b

  

 

Chapter ElevenSGML Functions (continued)

SGMLSetUTFEncoding Function

Overview

The SGMLSetUTFEncoding function sets the character encoding scheme to UTF-8 or ASCII.

Syntax/Parameters

Syntax

int = SGMLSetUTFEncoding ( handle hSGML, [int mode] );

Parameters

hSGML

A handle to an SGML Object.

mode

An optional int specifying the mode to employ. If non-zero, the mode is set to UTF-8, if zero it is set to ASCII, if -1 or omitted, the current value returned,

Return Value

An int as ERROR_NONE (0) on success of setting mode, zero or non-zero if reading the current encoding state or a formatted error code on error.

Remarks

UTF-8 allows for the encoding of Unicode characters within an 8-bit stream of characters. By default, the HTML element validators are set to expect ASCII.

The SGML parser is not encoding aware except that it expect 8-bit characters in SGML structure. It is up to the programmer to set the encoding as required. Encoding comes into play when validating attributes specified as CDATA such as the HTML core attribute TITLE.

Related Functions

Platform Support

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

Legato IDE, Legato Basic