Skip to Main Content

Oracle Database Discussions

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!

NVARCHAR2 and Cyrillic characters

Matthew RheaSep 23 2010
Hello, all. I’m having a problem returning non-Western characters. (I hope the Cyrillic characters come through in my example.)

CREATE TABLE TESTCYRILLIC (COL1 NVARCHAR2(80));

Insert into TESTCYRILLIC values (N'ДФЋ');

SELECT * FROM TESTCYRILLIC;

COL1
--------------------------------------------------------------------------------
¿¿¿

Here are the charactersets:
NLS_CHARACTERSET WE8MSWIN1252
NLS_NCHAR_CHARACTERSET AL16UTF16

When I run the above code in a database with these charactersets, it works.

NLS_CHARACTERSET AL32UTF8
NLS_NCHAR_CHARACTERSET AL16UTF16

COL1
--------------------------------------------------------------------------------
ДФЋ

Why can’t I get the correct result using an NVARCHAR2 column when the NLS_CHARACTERSET is WE8MSWIN1252? I thought by using NVARCHAR2 and inserting using the N’string’ format, you could store non western characters. As I understand it, there are basically two strategies you can take to provide Multilanguage/Unicode support – use Unicode databases (by using a Unicode-capable DB character set), or use Unicode datatypes (nchar, nvarchar2, etc). It’s the second option that isn’t working when I think it should be. At least, that’s what I thought this link was telling me:
http://download.oracle.com/docs/cd/B14117_01/server.101/b10749/ch6unicode.htm. Thanks for your help.

Matthew
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 21 2010
Added on Sep 23 2010
0 comments
490 views