I have to define the UTF8 character encoding connection parameter in the websphere JDBC datasource settings.
I didn't find any option to configure the connection parameter
?useUnicode=yes&characterEncoding=UTF-8
Eg: jdbc:sqlserver://localhost/DatabaseName?useUnicode=yes&characterEncoding=UTF-8
Is there any way to configure the characterEncoding connection parameter in the Websphere JDBC data source ?
The closest setting that I see on the Microsoft SQL Server JDBC driver is sendStringParametersAsUnicode
with values of true
or false
, which appears to be a way of getting PreparedStatement.setString and a few other methods to supply parameters to the database as unicode prior to the introduction of methods such as PreparedStatement.setNString in JDBC 4.0, which would always use unicode.