On 02/24/2015 12:30 PM, Γιάννης Παπαϊωάννου wrote:
> Hello,
> 1) when I start SWI-Prolog (latest version) from my iMac (Yosemite) I
> get error message at first lines. The message is :
>
> ERROR:
> /Applications/SWI-Prolog.app/Contents/swipl/library/
win_menu.pl:195:
> Initialization goal raised exception:
>
> ERROR: file_base_name/2: Cannot represent due to `encoding' (Cannot
> represent char U03a0 using current locale encoding)
Hmm. Seems that if you start an app, it does not pick the current
locale setting:
?- setlocale(ctype, L, L).
L = 'C'.
This while `locale` in an terminal says `en_GB.UTF-8`.
?- file_base_name('ab\u03a0', X).
ERROR: file_base_name/2: Cannot represent due to `encoding' (Cannot
represent char U03a0 using current locale encoding)
> 2) Also the screen freezes after some time and I can write anything, so
> it needs restart.
This might be related. Now, I have little idea how to make sure apps
pick the proper locale!? Maybe some Mac user knows.
> What should I do ?
Run the swipl executable that is also present in the app from an Mac
terminal window is probably a work-around.
Sort out how the Mac locale works is the other solution. My knowledge
of Macs is very limited. From a Prolog perspective, it picks up the
locale related environment variables. Possibly one needs to do
something else for the Mac?
Cheers --- Jan