Encoding problem

I’m using: SWI-Prolog version 5.08

I want the code to be compatible with letters like ş,ç,ı,ü,ö in Turkish language.

But what I’m getting is: “Illegal UTF-8 continuation” or
“ERROR: d:/prolog/adjectives.pl:5273:17: Syntax error: Operator expected”

My code looks like this:


Any help would be appreciated :slight_smile:

If you are using Windows then you need to upgrade to latest version.

Thank you Eric. Well,actually my Prolog is the latest version (9.0.4). Only Swi-Prolog Editor is 5.08. I could not really find the latest of this editor. If you know where it is could you please share with me? Also, yes I use Windows.

It is also upgraded to the latest version I believe.

Looks like a SWI-Prolog Editor issue. SWI-Prolog itself can handle full Unicode (the Windows version added support for code points above 0xffff only recently, but that mostly affects emojis).

1 Like

Thank you jan. Is there anything that I can do about it or SWI-Prolog team will fix it?

Raise it with the developers of SWI-Prolog Editor. The Windows editor project has nothing to do with SWI-Prolog. Sorry, we concentrate on portable tools.

A good alternative is to use plain SWI-Prolog that comes with its own tools or use GNU-Emacs with the “sweep” mode. See Sweep: SWI-Prolog Embedded in Emacs

There are also plugins for several other platforms such as Eclipse and VCS.

I get it. Thanks a lot for your help dear jan.

There are some declarations missing as well:

:- discontiguous allomorph/2.
:- discontiguous allomorph/3.

Thank you j4n.