I have built SWI-Prolog 9.0.4 on Linux. When I start swipl with a parameter containing non-ASCII characters, e.g. swipl -f /somepath/täst it will quit immediately with
[FATAL ERROR: at Wed Mar 22 14:46:03 2023
Could not set Prolog flag argv: not enough stack]
In the Windows built (from the web site), there are no problems with such paths.
I found the reason. I have built and run swipl within an Ubuntu docker container, which did not set the correct locale. LC_CTYPE was set to POSIX. I needed to look into the source code of SWI-Prolog to find out that this error message is created likely because of encoding conversion problems of the argument values.
I think it would be good to improve this error message to give the user a better hint.
LC_CTYPE=POSIX src/swipl -f täst.pl
[FATAL ERROR: at Thu Mar 23 10:09:48 2023
Could not set Prolog flag argv:
current locale cannot represent argv[2] (t\u00C3\u00A4st.pl)]
Aborted (core dumped)
Possibly a core dump is a bit too drastic for fatal errors that are not caused by bugs in Prolog itself bur rather from the environment in which is it called.