How to Insert and Retrieve Unicode Strings in an NCLOB Column Using JDBC (Doc ID 2190241.1)

Last updated on NOVEMBER 30, 2016

Applies to:

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

Goal

 The purpose of this note is to present various issues, techniques and tips relating to inserting and retrieving a string of Unicode characters into a column of type NCLOB. For the purpose of this exercise the table is created as follows:

The string used will be "こんにちは" which means "hello" in Japanese.

 

The tests were conducted on two Oracle databases, version 12.1.0.2: one installed on Windows 7 (64bit), and one installed on Linux (64bit).  On both of these databases the NLS_NCHAR_CHARACTERSET is the default AL16UTF16.

 

Solution

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