0

I have a table with NVarchar column in oracle.When I inserted below value it converted into some other characters.

Insert INTO tbltest (CONTENT) Values(N'✓ à la mode δ')
Select * From tbltest

CONTENT
--------------------
¿ à la mode d 

So what datatype should i take to save this type of data.Please suggest.

Wernfried Domscheit
  • 54,457
  • 9
  • 76
  • 110

2 Answers2

0

For SQL Developer I don't know exact solution but check settings in Tools -> Preferences -> Environment -> Encoding.

Select an encoding which supports your characters, e.g. UTF-8

Regarding your C# Code:

Microsoft .NET Framework Data Provider for Oracle is deprecated for many years, you should not use it in new projects. I think development stopped 20 years ago, thus it does not support Unicode characters - you cannot use it.

Use a modern provider, e.g. "Oracle Data Provider for .NET (ODP.NET)", you can download it from here: Oracle Data Access Components (ODAC) for Windows Downloads

In case of "Oracle Data Provider for .NET" you have to set NLS_LANG to an encoding which support these characters, e.g. .AL32UTF8. You can set NLS_LANG either as Environment variable or in Registry at HKLM\SOFTWARE\Wow6432Node\ORACLE\KEY_%ORACLE_HOME_NAME%\NLS_LANG (for 32 bit), resp. HKLM\SOFTWARE\ORACLE\KEY_%ORACLE_HOME_NAME%\NLS_LANG (for 64 bit).

Other providers (e.g. ODP.NET Managed Driver or Oracle OraOLEDB) are not NLS_LANG sensitive.

See more information here: OdbcConnection returning Chinese Characters as "?"

Community
  • 1
  • 1
Wernfried Domscheit
  • 54,457
  • 9
  • 76
  • 110
-1


This is due to your NLS_CHARACTERSET, NLS_NCHAR_CHARACTERSET database settings and NLS_LANG settings ar your client end where you are seeing.

As your value has special character specific to your language, you need to set with that. Like below

smshafiqulislam
  • 564
  • 6
  • 12