A reader, November 14, 2011 - 9:26 am UTC
Hi Tom
What you are saying is these are stored correctly in the database but during retrieval the characters are getting lost.
When i select from the Sql Developer i get the wrong characters.I had this notion that sql developer will select and display exactly what was stored.
Please suggest.
November 15, 2011 - 8:44 am UTC
did you check your NLS settings as I said to?
and you know, consistency is relevant:
Also when i use sql developer , it works fine
that is what you originally wrote. Now you have changed your mind?
check the CLIENT NLS_LANG SETTINGS please.
A reader, November 15, 2011 - 4:43 pm UTC
Hi Tom
1. This is what i did and got for nls_lang:
SQL>
SQL> host echo %NLS_LANG%
%NLS_LANG%
2. When i insert and select - both from sql developer ,the string is as it is.But when i insert from sqlplus ( from cmd ) and select from sql developer the problem arises.
- Thanks
November 16, 2011 - 9:37 am UTC
1) you are on windows, look in your registry.
2) that indicates to me that you have different character set settings somewhere and there is character set translation taking place. Check your NLS_LANG settings at all points. use dump() to compare the actual bytes being stored from each environment.
NLS_LANG and JDBC
Stew Ashton, November 16, 2011 - 11:26 am UTC
"Starting from Oracle Database 10g, the NLS_LANG variable is no longer part of the JDBC globalization mechanism. The JDBC driver does not check NLS environment. So, setting it has no effect."
http://download.oracle.com/docs/cd/E11882_01/java.112/e16548/global.htm In any case, the client character set part would be meaningless since the Java "string" type is always in UTF-16.
Since SQL Developer uses JDBC, the only things to check are on the SQL*Plus side.