Non ASCII Characters Being Inserted Into US7ASCII DB Using Thin JDBC Driver

(Doc ID 987704.1)

Last updated on MARCH 15, 2017

Applies to:

JDBC - Version and later
Information in this document applies to any platform.


While inserting a non-ascii character using THIN driver(such as u+00e1, á, or u+2019, ’ (unicode apostrophe)), then the value is NOT converted to it's US7ASCII substitution character when the
database characters set is US7ASCII.

JDBC THIN Behaves differently compared to JDBC OCI :-

OraclePreparedStatement stmt =
(OraclePreparedStatement)conn.prepareStatement("insert into t_foo values(?)");
String val = "\u00e1";
stmt.setString(1, val);

If the connection is done via the 'thin' driver, then the value 0xE1 is in the database.
Then do :

select dump(x,1016) from t_foo;

Typ=1 Len=1 CharacterSet=US7ASCII: e1

However when the JDBC-OCI driver is used, it works correctly, and the proper
substitution character is used (lower case 'a')

Typ=1 Len=1 CharacterSet=US7ASCII: 61


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms