Wrong Codepoints Retrieved With JDBC For XMLType Containing Special Characters With Database Characterset WE8ISO889P1
Last updated on MARCH 08, 2017
Applies to:JDBC - Version 220.127.116.11.0 and later
Information in this document applies to any platform.
Given a database created with database characterset WE8ISO889P1, corrupt characters are retrieved with JDBC 18.104.22.168.
The same data can be retrieved successfully with sqlplus when NLS_LAN is set to American_America.W8ISO8859P1.
Issue can be reproduced with the following steps:
1. Create a table as follows:
create table mytab (c1 varchar2(100), c2 varchar2(100), c3 number);
2. Then, insert a row with special characters:
insert into mytab values ('Uno','Frédéric Fröhlich',123);
3. From sqlplus, the results are the expected:
SQL> select * from mytab;
C1 C2 C3
------ --------------------- ------
Uno Frédéric Fröhlich 123
4. From JDBC , the characters are displayed incorrectly:
$ java mytab
Default Charset in Use=UTF8
JDBC Connection opened
Successfully created Session
Uno FrÃ©dÃ©ric FrÃ¶hlich 123
Note that character set in java session is always UTF-8, when expected to be WE8IS8859P1.
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