SYS(8000) - Unicode support

Top  Previous  Next

Enables or disables Unicode support in Guineu.

Syntax

SYS( 8000 [,0 | 1] )

Parameters

0

Disables Unicode mode. This is the default value at startup.

 

1

Enables Unicode mode.

Return value

Returns a numeric value as a character string that indicates the current state. If you don't pass a second parameter, Guineu returns the state without changing it.

Remarks

When Unicode mode is enabled, all functions that deal with strings support Unicode. Internally, Guineu uses Unicode exclusively and performs conversion to ANSI as needed.

 

Unicode mode impacts the creation of strings. It doesn't have impact on existing strings. That means when you create a string with Unicode mode enabled, this string remains a Unicode string even after you disabled Unicode mode.

 

The following functions behave differently when Unicode mode is enabled:

 

FILETOSTR

The first three bytes of a file decide if a file is treated as Unicode, UTF-8 or ANSI. A conversion is performed as needed.

 

To read a binary file you must disable Unicode support before. Otherwise the file might be converted if it happens to start with a byte order mark or a UTF-8 preamble.

 

STRTOFILE

The string is always stored in UTF-8 format. However, no UTF-8 preamble is written to the file.

 

See also

STRTOFILE()