arabic characters in oracle database

2019-02-26 01:31发布

问题:

Dear all, I am trying to do the following.

I want to store Arabic characters in my database but the problem they are stored like that '??? ????'. I have tried with these function:

msg_txt:=convert(msg_txt, 'AR8MSWIN1256', 'AR8ISO8859P6');

but I got this error:

ORA-01858: a non-numeric character was found where a numeric was expected

any suggestion please?

thanks

回答1:

What is your database and national character set? If you're not sure

SELECT *
  FROM v$nls_parameter
 WHERE name LIKE '%CHARACTERSET'

What is the data type of the msg_txt variable? CHAR/ VARCHAR2? Or NCHAR/ NVARCHAR2?



回答2:

make sure the data type is nvarchar (unicode)