Skip to content

Fix source reference extractor for multi-byte characters - #16914

Open
clonker wants to merge 2 commits into
developfrom
fix-invalid-utf8-source-reference-extractor
Open

Fix source reference extractor for multi-byte characters#16914
clonker wants to merge 2 commits into
developfrom
fix-invalid-utf8-source-reference-extractor

Conversation

@clonker

@clonker clonker commented Aug 13, 2026

Copy link
Copy Markdown
Member

When emitting a warning, we provide a source reference to go with it. If the source is long and contains utf8 characters, it could happen (due to the bytewise treatment), that a multi-byte character was cut in half, causing json serialization to yield an error. This fix moves the caret to the beginning of multi-byte characters when extracting the source reference and it is shortened.

@clonker
clonker force-pushed the fix-invalid-utf8-source-reference-extractor branch 2 times, most recently from 0c8d233 to 3fc5125 Compare August 13, 2026 07:48
@clonker
clonker marked this pull request as ready for review August 13, 2026 07:48
@clonker
clonker requested a review from rodiazet August 17, 2026 08:51
@clonker
clonker force-pushed the fix-invalid-utf8-source-reference-extractor branch from 3fc5125 to 19d42da Compare August 17, 2026 08:52
@clonker
clonker requested a review from matheusaaguiar August 18, 2026 09:40
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