Swipl exits silently when loading file from a Unicode path in a container

I’m using: SWI-Prolog version 8.3.20

in a path that is ascii only, prolog successfully loads a file, in both container and unsandboxed environments

$ cat hello.pl 
:- initialization main.
main :- format('hello world~n'), halt.
$ guix shell swi-prolog -- swipl hello.pl
hello world
$ guix shell --container swi-prolog -- swipl hello.pl
hello world

however when it contains unicode, prolog in a container silently fails to load it:

$ mv hello.pl Код/
$ cd Код/
$ guix shell swi-prolog -- swipl hello.pl
hello world
$ guix shell --container swi-prolog -- swipl hello.pl
$ echo $?
1
$

what could be done? is there a package i could include in the container to enable unicode support?

swi-prolog 8.4.3 works OK within ~/Код

I would firstly suspect your guix command.

Versions may also matter. Another suspect are locale settings.

thank you
LANG and LC_* are not set inside the container.
if locales are installed and language is set to a cyrillic one: guix shell --container swi-prolog coreutils glibc-locales -- env LANG=uk_UA.UTF-8 swipl hello.pl, that command has the same result - no output and exit code 1.
i will try --with-latest=swi-prolog. it will recompile swipl as there isn’t such a version on guix servers.

8.5.15: no difference

Hard to tell. Normally it should give some warning. I have no experience with guix. In these cases strace is typically my friend as it gives some clue what is happening.

Could try the same test in e.g. BASH or Python (rather than Prolog), to confirm whether it’s the guix command at fault.

bash and python pass:

$ cat hello.sh hello.py
echo hello world!
print('hello world!')
$ guix shell --container python -- python3 hello.py
hello world!
$ guix shell --container bash -- bash hello.sh
hello world!
$