Skip to content

Commit

Permalink
change charset in JSON converter for varchar
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-mkubik committed Nov 18, 2024
1 parent b62a4d9 commit 9857661
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package net.snowflake.client.core.json;

import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
import java.sql.Types;
import net.snowflake.client.core.SFException;
import net.snowflake.client.jdbc.ErrorCode;
Expand Down Expand Up @@ -52,7 +53,7 @@ public byte[] getBytes(Object obj, int columnType, int columnSubType, Integer sc
return converters
.getStringConverter()
.getString(obj, columnType, columnSubType, scale)
.getBytes();
.getBytes(StandardCharsets.UTF_8);
case Types.BOOLEAN:
return converters.getBooleanConverter().getBoolean(obj, columnType)
? new byte[] {1}
Expand Down

0 comments on commit 9857661

Please sign in to comment.