|Did you know ...||Search Documentation:|
|Unicode Prolog source|
The ISO standard specifies the Prolog syntax in ASCII characters. As SWI-Prolog supports Unicode in source files we must extend the syntax. This section describes the implication for the source files, while writing international source files is described in section 3.1.3.
The SWI-Prolog Unicode character classification is based on version 6.0.0 of the Unicode standard. Please note that char_type/2 and friends, intended to be used with all text except Prolog source code, is based on the C library locale-based classification routines.
\UXXXXXXXX(see section 188.8.131.52) were introduced to specify Unicode code points in ASCII files.
ID_Startfollowed by a sequence of
ID_Continuecodes. Such sequences are handled as a single token in SWI-Prolog. The token is a variable iff it starts with an uppercase character or an underscore (
_). Otherwise it is an atom. Note that many languages do not have the notion of character case. In such languages variables must be written as
: an unquoted sequence of symbol characters are combined into an atom).
Other characters (this is mainly
No: a numeric
character of other type) are currently handled as `solo'.