1

I have an oracle database which nls character set is set to ALS32UTF8 and nls nchar character set is set to UTF8.

But however if i insert any data to a nvarchar column in a table.

Subsequent when i do a select the data i got is ???.

Why is this so?

The funny thing is that using TOAD i can read view the correct nvarchar data using the schema brower - > data

But if i use sql to do a select i get ???.

Any idea anyone and how to resolve this?

2 Answers2

1

What is the NLS_LANG setting on your client? For a good reference on NLS parameters, read this FAQ by Oracle. For additional reading on Unicode, see this essay by Joel Spolsky.

DCookie
  • 42,630
  • 11
  • 83
  • 92
0

You need to set the clients NLS_LANG to utf.

sqlplus uses these environent variables (registry parameters on windows): (You may need to use sqlplusw.exe to use utf-8 on windows.)

NLS_LANG=AMERICAN_AMERICA.AL32UTF8 LC_CTYPE="en_US.UTF-8" ORA_NCHAR_LITERAL_REPLACE=true

See also : Inserting national characters into an oracle NCHAR or NVARCHAR column does not work

Community
  • 1
  • 1
KarlP
  • 5,149
  • 2
  • 28
  • 41