Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> character set mismatch with nchar insert
Hello,
I searched dejanews to discover that couple of people had problems with nchars before but somehow the problems were never resolved. I'll try to describe the strange behaviour I'm facing.
I'm using 8.1.5.0.0 on Solaris. The database was created with
select * from v$nls_parameters where parameter like '%CHAR%'
PARAMETER,VALUE
'NLS_NUMERIC_CHARACTERS','.,'
'NLS_CHARACTERSET','EE8ISO8859P2'
'NLS_NCHAR_CHARACTERSET','UTF8'
which I hope is correct since UTF8 is a superset of EE8ISO8859P2.
The NLS_LANG and NLS_NCHAR environment variables are both set to american_america.UTF8.
I create a table with nchar column:
SQL> create table testa (name char(4), nname nchar(4));
Table created.
Insert into the nchar column results in
SQL> insert into testa values ('a', 'a') ;
insert into testa values ('a', 'a')
*
ERROR at line 1:
ORA-12704: character set mismatch
Even if I want to insert data that is stored in the char column
SQL> insert into testa (name) values ('a') ;
1 row created.
SQL> insert into testa (nname) select name from testa ;
insert into testa (nname) select name from testa
*
ERROR at line 1:
ORA-12704: character set mismatch
I get the same error message.
Does anyone know whot one should do to make Oracle happy dealing with UTF8 national charset? What character sets are not matching here? UTF8 vs. UTF8?
Any hint would be greatly appreciated,
--