Skip to content

fix: flush of the pending high surrogate#1

Open
Boris (dzodkin33) wants to merge 1 commit into
elide-25.1.xfrom
fix/json-scanstring-lone-surrogate
Open

fix: flush of the pending high surrogate#1
Boris (dzodkin33) wants to merge 1 commit into
elide-25.1.xfrom
fix/json-scanstring-lone-surrogate

Conversation

@dzodkin33

Copy link
Copy Markdown
Member

Bug:
GraalPy's json scanner silently drops unpaired high surrogates from decoded JSON strings instead of preserving them like CPython does. Caused by a highSurrogate state variable that only gets flushed to the output when immediately followed by a matching low-surrogate escape: followed by a literal char, by another high surrogate, or by the closing quote.

Fix:
Added explicit flush of the pending high surrogate at those 3 loss points.

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.

1 participant