Skip to content

Bug with encoding hex characters with letters #56

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

Open
Fabimawn opened this issue Apr 30, 2025 · 1 comment
Open

Bug with encoding hex characters with letters #56

Fabimawn opened this issue Apr 30, 2025 · 1 comment

Comments

@Fabimawn
Copy link

The line: local testStr = jsonLua.encode("\x03test\x7a")
Outputs: "\u0003testz"

The first HEX charater is converted correctly, the second one isn't. If I make the second one a HEX only consisting of a number it converts correctly.
It doesn't matter if you use upper or lower case, alphanumerics in the HEX character doesn't seem to work.

@Fabimawn
Copy link
Author

Fabimawn commented Apr 30, 2025

It seems to work up to 1F. Is it only escaping control characters? Probably design choice then.

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

1 participant