Skip to content

Encode JSON parameters in the connection charset - #1774

Open
sharanggupta wants to merge 1 commit into
eclipse-vertx:masterfrom
sharanggupta:mysql-json-param-charset
Open

sharanggupta wants to merge 1 commit into
eclipse-vertx:masterfrom
sharanggupta:mysql-json-param-charset

Conversation

@sharanggupta

Copy link
Copy Markdown

Since #1685, MySQL JsonObject/JsonArray parameters are always written as UTF-8, while the rest of the parameters use the connection's encoding charset. On a connection with a non-UTF-8 collation, such as gbk_chinese_ci, the server reads garbled text: {"city":"北京"} comes back as 鍖椾含. UTF-8 connections keep the direct encoding; others go through the charset again, as before #1685. The new test passes on the commit before #1685.

Since eclipse-vertx#1685 JSON parameters were always written as UTF-8, so a
connection with a non-UTF-8 collation received garbled text.

Signed-off-by: Sharang Gupta <sharang@sharanggupta.dev>
Assisted-by: Anthropic Claude (claude-opus-5-5)
@vietj vietj added this to the 5.3.0 milestone Oct 29, 2026

This branch has not been deployed

No deployments
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.

2 participants