I have a list of Character Codes in prolog.
I would like to change them into characters.
For instance,
L = \"abc\" returns L = [9
L = \"abc\"
L = [9
Characters are represented as atoms of length 1. You can produce them:
At read time by changing the Prolog flag double_quotes. For more, see this and that link.
double_quotes
:- set_prolog_flag(double_quotes, chars).
Dynamically, you can use atom_codes/2 and atom_chars/2. Or you can use char_code/2 directly.
atom_codes/2
atom_chars/2
char_code/2