Skip to content

Normalize white-space and odd digit counts in hexadecimal strings#452

Merged
PrinsFrank merged 1 commit into
PrinsFrank:mainfrom
cosmocode:hextobin
Jul 21, 2026
Merged

Normalize white-space and odd digit counts in hexadecimal strings#452
PrinsFrank merged 1 commit into
PrinsFrank:mainfrom
cosmocode:hextobin

Conversation

@splitbrain

Copy link
Copy Markdown
Contributor

Per 7.3.4.3, white-space within a hexadecimal string is ignored and a missing final digit is assumed to be 0. Such spec-valid strings were passed straight to hex2bin(), which emitted a warning and returned false, so the string was rejected and its text lost.

@PrinsFrank PrinsFrank left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Hi, thanks for the PR!

Can you please rebase this? I'm willing to do it but am unable to do so because the "allow edits by maintainer" checkbox is not checked.

Can you also clean up the comments?

Thanks again!

Per 7.3.4.3, white-space within a hexadecimal string is ignored and a
missing final digit is assumed to be 0. Such spec-valid strings were
passed straight to hex2bin(), which emitted a warning and returned
false, so the string was rejected and its text lost.
@splitbrain

Copy link
Copy Markdown
Contributor Author

rebased, inline comments removed

@PrinsFrank PrinsFrank left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thank you!!!

@PrinsFrank
PrinsFrank merged commit 628eb7b into PrinsFrank:main Jul 21, 2026
22 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.

2 participants