when I first used :-encoding(utf8). I got a compile error, complaining about the use of greek letters in the predicate. using :-encoding(utf16be). I got rid of the error, but now there seems to be something wrong with the file format (unexpected EOF). Line 3 is the :-encoding(utf16be). obviously this line is not 945 chars long.
Ok. I found out that using greek letters is not the issue. I can use the greek letter THETA for a variable and assign a value, and I can do calculations with it. So the problem is in the file format.
Oh my word! it works
I changed to encoding(utf8) instead of encoding(utf16be).
It didn’t work the first time though, and apparently the following in line 1 is also necessary: /* -*- coding UTF-16 -*- */
it looks a bit wonky but the outer /* … */ were necessary to protect from compile errors from SWI-Prolog.
So now I have:
Right. Yes, this is all outdated. I don’t think there is anything wrong with UTF-16 encoding, but it reads the encoding directive in the initial encoding. The initial encoding is determined by the BOM marker or, if this is not present, by the current locale.
just an afterthought, variables still have to be Capitalized. So small cap rho for density is a no-no, but Capital Rho is ok. So I’ll say it works almost as intented.