When the SICStus Prolog system starts up, its WCX mode is selected
according to the value of the SP_CTYPE
environment variable. The
supported values of the SP_CTYPE
environment variable are the
following:
iso_8859_1
(default)
utf8
This WCX mode is primarily intended to support the UNICODE
character set, but it also allows the input and output of character
codes above the UNICODE character code range.
euc
In all three cases the system encoding is implemented as truncation to 8-bits, i.e. any code output to the operating system is taken modulo 256, any byte coming from the operating system is mapped to the code with the same value.
The figure below shows an example interaction with SICStus Prolog in EUC
mode. For the role of the SP_CSETLEN
environment variable,
see Representation of EUC Wide Characters.