Unicode problem and ORA-12899 error! [message #137550] |
Thu, 15 September 2005 09:05 |
Achchan
Messages: 86 Registered: June 2005
|
Member |
|
|
Hi all,
we had a database which its nls_characterset was WE8MSWIN1252 so we could not save non-Latin data there so we reinstall it with AL32UTF8 characterset.
We run a script that creates all structures and procedures and ....But now when we try to do an insert in a varchar2(30) or char(18) column it raises ORA-12899 error and says the value is too long for this column! we haven't had this before with english data so I think it is because of greater storage for unicode characters.I tried to change NLS_LENGTH_SEMANTICS in system and session level but no chance! same error we see more and more!
I am running 10gR1 on win xp and my nls_languag AERICAN and territory is AMERICA. also ACP is 1252 and OEMCP is 720.
What should i change?
-Thanks very much
|
|
|
Re: Unicode problem and ORA-12899 error! [message #137570 is a reply to message #137550] |
Thu, 15 September 2005 10:10 |
Jay Munshi
Messages: 30 Registered: July 2004
|
Member |
|
|
Hi,
"col1 varchar2(30)" means that col1 will store 30 bytes. since latin characters are one byte each it will store 30 characters. If the chracterset used is non latin i.e. multibyte its not gonna fit in varchar2(30) hence there is going to be insufficient allocation for the data in the specified column leading to overflow and the error.
I think a quick test would help you out.
1)either change your data type to nvarchar2(30)
or
2)modify your columnt to varchar2(60) or varchar2(180) depending on the characterset being two byte or three byte characterset.
This is very interesting and I too had faced a similar problem when was trying to support finnish with english.
Hope this helps
--------------------
Regards,
Jay Munshi
DBA
Eftia OSS Solutions Asia-Pac Pvt. Ltd.
http://jaydba.tripod.com
|
|
|