Re: Per field encoding
Posted by: Tom Eugelink
Date: May 10, 2024 11:03AM

But all the other tables have latin1 encoding, so I cannot change the connection string.

The point of the example is that on the same column setString does its thing, setCharacterStream throws an exception.

And "When sending as a stream of character data you need to send the bytes matching the target encoding." is not correct, the JDBC documentation states: "The JDBC driver will do any necessary conversion from UNICODE to the database char format"

https://docs.oracle.com/javase/8/docs/api/java/sql/PreparedStatement.html#setCharacterStream-int-java.io.Reader-

Options: ReplyQuote


Subject
Written By
Posted
May 02, 2024 05:39AM
May 03, 2024 05:02AM
May 03, 2024 06:46AM
May 06, 2024 03:58AM
May 06, 2024 04:23PM
May 10, 2024 07:17AM
May 10, 2024 10:58AM
Re: Per field encoding
May 10, 2024 11:03AM
May 13, 2024 06:51PM
May 13, 2024 11:56PM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.