Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Japanese Characters insert issue in NVARCHAR2

Navneet SinghApr 4 2017 — edited Apr 6 2017

Hi All

My Database version is Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production.

select * from nls_database_parameters;

NLS_LANGUAGE    AMERICAN

NLS_TERRITORY    AMERICA

NLS_CURRENCY    $

NLS_ISO_CURRENCY    AMERICA

NLS_NUMERIC_CHARACTERS    .,

NLS_CHARACTERSET    WE8MSWIN1252

NLS_CALENDAR    GREGORIAN

NLS_DATE_FORMAT    DD-MON-RR

NLS_DATE_LANGUAGE    AMERICAN

NLS_SORT    BINARY

NLS_TIME_FORMAT    HH.MI.SSXFF AM

NLS_TIMESTAMP_FORMAT    DD-MON-RR HH.MI.SSXFF AM

NLS_TIME_TZ_FORMAT    HH.MI.SSXFF AM TZR

NLS_TIMESTAMP_TZ_FORMAT    DD-MON-RR HH.MI.SSXFF AM TZR

NLS_DUAL_CURRENCY    $

NLS_COMP    BINARY

NLS_LENGTH_SEMANTICS    BYTE

NLS_NCHAR_CONV_EXCP    FALSE

NLS_NCHAR_CHARACTERSET    AL16UTF16

NLS_RDBMS_VERSION    11.2.0.1.0

I am trying to insert Japanese Characters 'えています' in NVARCHAR2(250) data type. After inserting into database, Japanese characters are converting to '¿¿¿¿¿' upside down question marks.

During my research on internet i found:

  • NLS_CHARACTERSET: declares what character set scheme (code page) is used for encoding CHAR, VARCHAR2, LONG, and CLOB datatypes.
  • NLS_ NCHAR_CHARACTERSET: declares what character set scheme (code page) is used for encoding NCHAR and NVARCHAR2 and NCLOB datatypes.

In my Database NLS_ NCHAR_CHARACTERSET value is 'AL16UTF16' so as per above research Japanese characters should get insert in national characterset (NCHAR and NVARCHAR2 and NCLOB), However it is not.

Q1 - Is there any relation between NLS_CHARACTERSET and NLS_ NCHAR_CHARACTERSET?

Q2 - Do we need to have NLS_CHARACTERSET and NLS_ NCHAR_CHARACTERSET values to AL32UTF8 and AL16UTF16 respectively to make NVARCHAR2 working for Japanese characters?

because In another instance NLS_CHARACTERSET value is AL32UTF8 and for NLS_ NCHAR_CHARACTERSET is AL16UTF16 and it is allowing us to insert Japanese characters in both the datatypes (NVARCHAR2).

As per my understanding if only NLS_NCHAR_CHARACTERSET value is AL16UTF16 then it should allow to insert Japanese character in National DataTypes irrespective of NLS_CHARACTERSET.

So why it is not supporting to insert Japanese characters ?

Please anyone can help to understand this concept?

Thanks in Advance

This post has been answered by Sergiusz Wolicki-Oracle on Apr 5 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 3 2017
Added on Apr 4 2017
4 comments
5,948 views