We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 50c1374 commit 5f8b431Copy full SHA for 5f8b431
src/backend/utils/adt/json.c
@@ -721,7 +721,7 @@ json_lex_string(JsonLexContext *lex)
721
unicode_to_utf8(ch, (unsigned char *) utf8str);
722
utf8len = pg_utf_mblen((unsigned char *) utf8str);
723
utf8str[utf8len] = '\0';
724
- converted = pg_any_to_server(utf8str, 1, PG_UTF8);
+ converted = pg_any_to_server(utf8str, utf8len, PG_UTF8);
725
appendStringInfoString(lex->strval, converted);
726
if (converted != utf8str)
727
pfree(converted);
0 commit comments