FUNCTIONS GT

GTI_ISUNICODE

Tell whether the terminal works with Unicode

Syntax

Signature
GtInfo( GTI_ISUNICODE ) --> lUnicode

Arguments

GTI_ISUNICODE

The selector, from gtinfo.ch.

Return value

.T. for all xDev graphics drivers.

Description

The screen and the keyboard use Unicode characters, and the program exchanges them as UTF-8.

Notes

Supported by GTWVT, GTSDL3, GTXWC and GTGLFW. On other terminals the result is NIL.

Example

GTI_ISUNICODE.prg
#include "gtinfo.ch"

#if OS_LINUX
   REQUEST GTXWC
#else
   REQUEST GTWVT
#endif

PROCEDURE Main()

   LOCAL lUnicode := GtInfo( GTI_ISUNICODE ) == .T.

   IF lUnicode
      DispOutAt( 1, 2, "UTF-8 sample: Zażółć gęślą jaźń" )
   ELSE
      DispOutAt( 1, 2, "ASCII sample: terminal output" )
   ENDIF
   Inkey( 3 )

RETURN

Output

See also