2

I guess it's a very common question, it's a pitty I can't find the answer myself.

My Oracle 10g Express Database is WE8MSWIN1252 encoding

select * from nls_database_parameters where parameter='NLS_CHARACTERSET'

And when I try to insert/read unicode symbols (.net String type) via OraOLEDB.Oracle Provider I get "????" symbols.

Oracle administrative web-tool displays the same abracadabra symbols "????".

How can I get symbols exactly I inserted ?

Shall I change Database Encoding, OleDb Provider, Connection String or shall I manipulate somehow with insert/select options?

Andrew Florko
  • 7,672
  • 10
  • 60
  • 107

1 Answers1

2

With your current settings, you can only store such characters in "national" column types: NVARCHAR2, NCHAR, NCLOB... See the NLS_NCHAR_CHARACTERSET parameter for the exact encoding. In regular column types (VARCHAR2, CHAR, CLOB...) you are restrained to the Windows-1252 code page.

You get question marks because Oracle will never complain about wrong encodings. Instead, it'll try to convert your input to the target encoding and, when that's not possible, will silently ruin your data.

Another option would be to install the Universal edition of Oracle XE (you currently have the Western European one).

Update: See also this related question: Difference between VARCHAR2(10 CHAR) and NVARCHAR2(10)

Community
  • 1
  • 1
Álvaro González
  • 142,137
  • 41
  • 261
  • 360