Skip to content

Commit 79db6a5

Browse files
committed
Revert changes made in d4d62e9
To be consistent with PreparedStatement.setUnicodeStream which provides UTF-8 encoding, ResultSet.getUnicodeStream has to also use the same encoding. Changes in d4d62e9 were made under the influence of JDBC API for getUnicodeStream that says 'a stream of two-byte 3 characters. The first byte is the high byte; the second byte is the low byte'.
1 parent 7ccf3bd commit 79db6a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/tarantool/jdbc/SQLResultSet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ public InputStream getAsciiStream(String columnLabel) throws SQLException {
336336
@Override
337337
public InputStream getUnicodeStream(int columnIndex) throws SQLException {
338338
String string = getString(columnIndex);
339-
return string == null ? null : new ByteArrayInputStream(string.getBytes(Charset.forName("UTF-16")));
339+
return string == null ? null : new ByteArrayInputStream(string.getBytes(Charset.forName("UTF-8")));
340340
}
341341

342342
@Override

0 commit comments

Comments
 (0)