Repository navigation
Fix matching for non-ASCII-equivalent ASCII chars - #903
Open
natecook1000 wants to merge 1 commit into
Open
natecook1000 wants to merge 1 commit into
natecook1000 wants to merge 1 commit into
Conversation
natecook1000
force-pushed
the
fix/non-ascii-match
branch
from
October 13, 2026 18:29
f088c51 to
fa3af1f
Compare
Three non-ASCII scalars have canonical equivalence to ASCII ones:
U+037E GREEK QUESTION MARK == ";"
U+212A KELVIN SIGN == "K"
U+1FEF GREEK VARIA == "`"
For these ASCII characters, we can't just rely on byte-by-byte
matching. This change detects those characters in runs that can
otherwise be matched at the byte level and inserts `matchScalarPair`
instructions as needed for correct matching.
When matching with Unicode scalar semantics, this adjustment isn't
needed, since canonical equivalence doesn't play a role in matching.
natecook1000
force-pushed
the
fix/non-ascii-match
branch
from
October 13, 2026 18:43
fa3af1f to
4e4daf7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three non-ASCII scalars have canonical equivalence to ASCII ones:
For these ASCII characters, we can't just rely on byte-by-byte matching. This change detects those characters in runs that can otherwise be matched at the byte level and inserts
matchScalarPairinstructions as needed for correct matching. Skipping ASCII matching for these characters incurs some additional runtime cost, so this change includes a new instruction that can match either of two scalars, combined in a single payload.When matching with Unicode scalar semantics, this adjustment isn't needed, since canonical equivalence doesn't play a role in matching.