Skip to content

Fix non-ASCII character handling in parse diagnostics - #899

Merged
KodrAus merged 1 commit into
uuid-rs:mainfrom
questfever:main
Aug 14, 2026
Merged

Fix non-ASCII character handling in parse diagnostics#899
KodrAus merged 1 commit into
uuid-rs:mainfrom
questfever:main

Conversation

@questfever

Copy link
Copy Markdown
Contributor

Closes #898

Summary

Fix detailed UUID parse diagnostics for non-ASCII characters whose low byte matches a valid ASCII UUID character.

InvalidUuid::into_err previously cast each Unicode char to u8 before classifying it. This lossy conversion could misclassify characters such as U+0130 (İ) as ASCII hexadecimal digits.

The diagnostic logic now checks the original character with char::is_ascii_hexdigit(), avoiding the truncating conversion.

A regression test verifies that U+0130 produces:

invalid character: found `İ` at 0

@KodrAus KodrAus left a comment

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.

Thanks @questfever!

@KodrAus
KodrAus merged commit e113df8 into uuid-rs:main Aug 14, 2026
23 checks passed
kodiakhq Bot pushed a commit to pdylanross/fatigue that referenced this pull request Aug 18, 2026
Bumps uuid from 1.24.0 to 1.24.1.

Release notes
Sourced from uuid's releases.

v1.24.1
What's Changed

Fix non-ASCII character handling in parse diagnostics by @​questfever in uuid-rs/uuid#899
Prepare for 1.24.1 release by @​KodrAus in uuid-rs/uuid#900

New Contributors

@​questfever made their first contribution in uuid-rs/uuid#899

Full Changelog: uuid-rs/uuid@v1.24.0...v1.24.1



Commits

2ea38af Merge pull request #900 from uuid-rs/cargo/v1.24.1
9dbeb04 prepare for 1.24.1 release
e113df8 Merge pull request #899 from questfever/main
b017765 Fix non-ASCII character handling in parse diagnostics
See full diff in compare view




Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

@dependabot rebase will rebase this PR
@dependabot recreate will recreate this PR, overwriting any edits that have been made to it
@dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
@dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
@dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
@dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
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.

Non-ASCII characters can be misclassified in detailed parse errors

2 participants