72b037275f
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1288 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
36 lines
1.5 KiB
Plaintext
36 lines
1.5 KiB
Plaintext
=================================================================
|
|
Logtalk - Object oriented extension to Prolog
|
|
Release 2.25.0
|
|
|
|
Copyright (c) 1998-2005 Paulo Moura. All Rights Reserved.
|
|
=================================================================
|
|
|
|
|
|
To load this example and for sample queries, please see the SCRIPT file.
|
|
|
|
This is a very simple example of using the new, experimental encoding/1
|
|
directive, which is fully based on the directive with the same name found
|
|
on recent development releases of SWI-Prolog. Currently, this example
|
|
requires Logtalk to be run with the SWI-Prolog compiler.
|
|
|
|
The "babel.lgt" source file uses UTF-8 encoding. The "latin.lgt" source
|
|
file uses ISO-8859-1 (Latin 1) encoding. Be sure to use a text editor that
|
|
supports these encodings when opening these files. In addition, you may
|
|
need to configure your text editor to open the source file using the
|
|
declared encoding. If you are using the SWI-Prolog GUI application on
|
|
Windows, be sure to select a font which supports Unicode characters.
|
|
|
|
Currently, Logtalk accepts any atom is an argument for the encoding/1
|
|
directive. As, by default, Logtalk automatically generates a XML documenting
|
|
file for each compiled entity, the following table is used to set the
|
|
encoding of the XML file:
|
|
|
|
Logtalk source file XML file
|
|
ascii us-ascii
|
|
iso_latin_1 iso-8859-1
|
|
unicode_be utf-16
|
|
unicode_le utf-16
|
|
utf8 utf-8
|
|
|
|
Note that the values on the left column are the ones recognized by SWI-Prolog.
|