My Oracle Support Banner

Wrong Codepoints Retrieved With JDBC For XMLType Containing Special Characters With Database Characterset WE8ISO889P1 (Doc ID 1612839.1)

Last updated on MARCH 08, 2017

Applies to:

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


Given a database created with database characterset WE8ISO889P1, corrupt characters are retrieved with JDBC
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=UTF-8
Default Charset=UTF-8
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.


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

This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.
My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.