Skip to content

fix: process unicode escape sequences - #317

Open
keynslug wants to merge 2 commits into
masterfrom
fix/uescape
Open

fix: process unicode escape sequences#317
keynslug wants to merge 2 commits into
masterfrom
fix/uescape

Conversation

@keynslug

Copy link
Copy Markdown
Contributor

Summary

This PR adds missing processing for JSON-compatible Unicode escape sequences, adapted from OTP-28's json module.

This commit adds missing processing for JSON-compatible Unicode
escape sequences, adapted from OTP-28's `json` module.
@keynslug
keynslug marked this pull request as ready for review July 31, 2026 09:46
Comment thread src/hocon_scanner.xrl
unesc([$\\, $r | T]) -> {$\r, T};
unesc([$\\, $b | T]) -> {$\b, T};
unesc([$\\, $f | T]) -> {$\f, T};
unesc([$\\, $u | T]) -> unescapeu(T);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this only unescapes double quote strings.
for """ strings, maybe add a test case to cover that it's intentionally not unescaped

@keynslug
keynslug requested a review from zmstone July 31, 2026 14:13
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

Successfully merging this pull request may close these issues.

2 participants