When running a MeTTa script in SWI-Prolog version 9.3.11, Unicode characters such as "ɑ" (Latin small letter alpha) are not handled correctly in the output. The output is expected to show proper handling of the Unicode character, but instead, it displays an incorrect representation (\u0251) in some cases when using mettalog and metta commands.
The output should display the Unicode character "ɑ" correctly, as in:
ny -> ɑ0 [label="ny"]
nx -> ɑ0 [label="nz"]
ɑ0 -> nA [label="n1"]
Actual Behavior:
The output is displaying a Unicode escape sequence instead of the actual character:
ny -> \u02510 [label="ny"]
nx -> \u02510 [label="nz"]
\u02510 -> nA [label="n1"]
System Information:
SWI-Prolog version: 9.3.11 for x86_64-linux
OS: Linux (Debian 12)
Additional Context:
Running the same script using the metta command works as expected and displays the Unicode character "ɑ" correctly, but when using mettalog, the issue occurs. The mettalog output is mishandling the Unicode characters, while metta works fine. The issue may be related to stream encoding settings in mettalog.
When running a MeTTa script in SWI-Prolog version 9.3.11, Unicode characters such as "ɑ" (Latin small letter alpha) are not handled correctly in the output. The output is expected to show proper handling of the Unicode character, but instead, it displays an incorrect representation (
\u0251
) in some cases when usingmettalog
andmetta
commands.Steps to Reproduce:
Create a test file with the following contents:
Run the script with
mettalog
command:Expected Behavior:
The output should display the Unicode character "ɑ" correctly, as in:
Actual Behavior:
The output is displaying a Unicode escape sequence instead of the actual character:
System Information:
Additional Context:
Running the same script using the
metta
command works as expected and displays the Unicode character "ɑ" correctly, but when usingmettalog
, the issue occurs. Themettalog
output is mishandling the Unicode characters, whilemetta
works fine. The issue may be related to stream encoding settings inmettalog
.