0

I want my asp .net application to store Chinese charachters in WE8MSWIN1252 oracle 12c database, which oracle client should I use without changing db Charachterset.

I'm using windows server, I'v tried to set nls_lang in registry to Chinese charachterset but my app still store charachter like ??? in database.

1 Answers1

0

Short answer:

You cannot store Chinese characters if your database character set is WE8MSWIN1252. Setting NLS_LANG has nothing to do with the ability to store characters in a database.

Long answer:

Usually the National Character Set (check with SELECT * FROM V$NLS_PARAMETERS WHERE PARAMETER = 'NLS_NCHAR_CHARACTERSET';) of a database support full Unicode, nowadays the default should be AL16UTF16. Use NVARCHAR2, NCHAR, NCLOB data type for columns where you like to store Chinese characters.

A workaround could be to convert your string to BASE64 and store these in your database, see Base64 encoding and decoding in oracle

For another ugly and very dangerous workaround see this one: difference between NLS_NCHAR_CHARACTERSET abd NLS_CHARACTERSET for Oracle

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