Is there a portable way to change the Prolog escaping. I have the following in mind, usualy an atom is escaped as follows, for example using octal escaping:
/* SWI-Prolog 8.3.23 */
?- X = 'abc\x0001\def'.
X = 'abc\001\def'.
But what I want to archive, is an output as follows.
If a compound '$STR'/1
is used, the escape should
be "\uXXXX"
instead of octal escaping and double quotes:
?- X = '$STR'('abc\x0001\def').
X = "abc\u0001def".
Do Prolog systems have some hook, like portray, that
could do that? I do not expect approaches based on ISO
core standard, already "\uXXXX"
isn't ISO core standard