Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A escaped null byte (0x00) in the middle of strings literals is ignored #2810

Open
Kiyoshi364 opened this issue Feb 3, 2025 · 3 comments
Open

Comments

@Kiyoshi364
Copy link

?- A = "hello \x00\world".
   A = "hello world".
   % expected: A = "hello \x0\world".
?- A = [h, e, l, l, o, ' ', '\x00\', w, o, r, l, d].
   A = "hello world".
   % expected: A = "hello \x0\world".
?- NULL = '\x00\', A = [h, e, l, l, o, ' ', NULL, w, o, r, l, d].
   NULL = '\x0\', A = "hello \x0\world". % expected

I guess it is a bug on the compact string representation.

@triska
Copy link
Contributor

triska commented Feb 3, 2025

Yes, please see also: #1969.

@Kiyoshi364
Copy link
Author

Sorry for the duplicate.
I searched for "escape" and "0".
Should this issue be closed then?

@triska
Copy link
Contributor

triska commented Feb 3, 2025

Should this issue be closed then?

In case of doubt, please leave it open: Even though it seems very similar and closely related, we do not know that this is due to the same reason. When it is fixed, we can easily find and close all related issues because they are linked in this way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants