1010223 wrote:I wonder if that's the problem, then?
From the database side, you have:
1 NLS_LANGUAGE AMERICAN
2 NLS_TERRITORY AMERICA
9 NLS_CHARACTERSET WE8MSWIN1252Now, the character set itself matches, however, the language and territory doesn't. I myself, am not 100% if that's having an effect - hopefully somebody else more knowledgeable can help :) Sorry I can't help more than that. You might try that, though. It won't hurt to change 1 PC windows registry to match the database, and see if it has an effect. If not, change it back.
Please, make sure you look into the right Registry key when looking at NLS_LANG. Start your .NET application or PL/SQL Developer and use a tool such as procmon.exe from Sysinternals suite to look at what Oracle DLL libraries are loaded. Look into the \BIN\ directory containing the libraries and search for the file oracle.key. This file contains the Registry branch name that you should check. Look at bot HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE branches. Also, environment variables override the registry. Open the Command Prompt window, issue the SET command with no parameters and check if NLS_LANG is not among the variables. Make sure that any identified setting contains .WE8MSWIN1252.
Do you use ODP .NET for the .NET application? This API should actually be immune to NLS_LANG. When looking at data in the .NET application, make sure that you look at data inserted by the application itself or by Oracle SQL Developer. If you look at data inserted with PL/SQL Developer with a wrong NLS_LANG, the data is already corrupted in the database.
When I use procmon to monitor our appliction, I could only find 1 entry with NLS_LAN:
HKLM\SOFTWARE\Wow6432Node\ORACLE\NLS_LANG, but the result was: NAME NOT FOUND.
When I use regedit, this entry doesn't exists: link
In the oracle.key file I found this:
But that doesn't exists either.
In regedit, this was the only hit for NLS_LANG:
SET in command prompt didn't show a record for NLS_LANG.
What is the best solution? Is this a bug?
When I add this entry: HKLM\SOFTWARE\Wow6432Node\ORACLE\NLS_LANG, then everything seems to work. But maybe there is a better solution?