Skip to content

fix: process unicode escape sequences - #317

Merged
keynslug merged 2 commits into
masterfrom
fix/uescape
Aug 7, 2026
Merged

fix: process unicode escape sequences#317
keynslug merged 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
@keynslug
keynslug merged commit 97b0f22 into master Aug 7, 2026
6 checks passed
@keynslug
keynslug deleted the fix/uescape branch August 7, 2026 08:30
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