Skip to content

🐛 Use literal syntax for invalid UTF8 or non-UTF8 strings#713

Merged
nevans merged 3 commits into
masterfrom
send-invalid-utf8-as-literal
Jul 8, 2026
Merged

🐛 Use literal syntax for invalid UTF8 or non-UTF8 strings#713
nevans merged 3 commits into
masterfrom
send-invalid-utf8-as-literal

Conversation

@nevans

@nevans nevans commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Prior to this PR, when UTF-8 is enabled, non-ASCII strings are assumed to be valid UTF-8. They will be sent

Also, similar to #712, send_string_data could theoretically raise an encoding error if the regular expressions attempt to process an invalid string.

nevans added 3 commits July 8, 2026 14:39
This makes the logic a little bit simpler to follow, which makes UTF-8
validation bug much more obvious.
Don't send strings as `quoted` unless they are valid UTF-8.
Base automatically changed from test-for-null-bytes-in-string-args to master July 8, 2026 19:05
@nevans nevans added the bug Something isn't working label Jul 8, 2026
@nevans nevans marked this pull request as ready for review July 8, 2026 19:05
@nevans nevans merged commit bb33b4e into master Jul 8, 2026
39 checks passed
@nevans nevans deleted the send-invalid-utf8-as-literal branch July 8, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant