Skip to content

Commit 08e37a2

Browse files
committed
Revert "Change getUnicodeStream encoding from UTF-8 to UTF-16."
This reverts commit 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 0baaefa commit 08e37a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/main/java/org/tarantool/jdbc/SQLResultSet.java

+1-1
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)