Wrong Codepoints Retrieved With JDBC For XMLType Containing Special Characters With Database Characterset WE8ISO889P1
(Doc ID 1612839.1)
Last updated on MARCH 18, 2019
Applies to:JDBC - Version 22.214.171.124.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 126.96.36.199.
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',cinéma',123);
3. From sqlplus, the results are the expected:
SQL> select * from mytab;
C1 C2 C3
------ --------------------- ------
Uno cinéma 123
4. From JDBC , the characters are displayed incorrectly:
$ java mytab
Default Charset in Use=UTF8
JDBC Connection opened
Successfully created Session
Uno CinÃ©ma 123
Note that character set in java session is always UTF-8, when expected to be WE8IS8859P1.
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document