Skip to content

Use SMALL_ATOM_UTF8_EXT and ATOM_UTF8_EXT for safer atom encoding#16

Merged
sile merged 4 commits intomasterfrom
utf8-atom
Sep 6, 2025
Merged

Use SMALL_ATOM_UTF8_EXT and ATOM_UTF8_EXT for safer atom encoding#16
sile merged 4 commits intomasterfrom
utf8-atom

Conversation

@sile
Copy link
Copy Markdown
Owner

@sile sile commented Sep 6, 2025

Fix #13

@sile sile requested a review from Copilot September 6, 2025 07:25
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Updates atom encoding to use the UTF-8 atom encoding tags (SMALL_ATOM_UTF8_EXT and ATOM_UTF8_EXT) instead of the deprecated ASCII-only atom encoding tag (ATOM_EXT). This ensures proper handling of non-ASCII characters in atom names and follows current Erlang Term Format conventions.

  • Changes atom encoding logic to use length-based encoding selection instead of ASCII detection
  • Updates all test assertions to reflect the new encoding format
  • Updates documentation examples to use the new encoding

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/codec.rs Core encoding logic updated to use UTF-8 atom encoding based on length
tests/lib.rs Test assertions updated to match new encoding format
src/lib.rs Documentation examples updated to reflect new encoding

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@sile sile merged commit 213e634 into master Sep 6, 2025
9 checks passed
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.

No way to generate [:safe] ETF payload

2 participants