Error(s)

104 views
Skip to first unread message

Γιάννης Παπαϊωάννου

unread,
Feb 24, 2015, 6:30:29 AM2/24/15
to swi-p...@googlegroups.com
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)



2) Also the screen freezes after some time and I can write anything, so it needs restart.


What should I do ?


Thanks.

Jan Wielemaker

unread,
Feb 24, 2015, 6:56:27 AM2/24/15
to Γιάννης Παπαϊωάννου, swi-p...@googlegroups.com
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

Γιάννης Παπαϊωάννου

unread,
Feb 24, 2015, 7:07:19 AM2/24/15
to swi-p...@googlegroups.com, giannispan...@gmail.com
When I start the app from Terminal I get no errors :)
So, I have to open it always from there ?
Thank you so much.  

Jan Wielemaker

unread,
Feb 24, 2015, 7:08:46 AM2/24/15
to Γιάννης Παπαϊωάννου, swi-p...@googlegroups.com
On 02/24/2015 01:07 PM, Γιάννης Παπαϊωάννου wrote:
>
> When I start the app from Terminal I get no errors :)
> So, I have to open it always from there ?

Unless you can help fixing the problem or someone else knows
the secret ...

Cheers --- Jan

> Thank you so much.

Reply all
Reply to author
Forward
0 new messages