Problem with storing Chinese characters when app running on service account
918133Feb 16 2012 — edited Feb 27 2012Having a problem with storing Chinese characters in an Oracle database when program is running under a service account on a Windows 2003 server. Running Oracle 11g.
I have a non Unicode compliant application that will read a data file and store the data in an Oracle database.
· The database NLS_CHARACTERSET is UTF8
· The Key_Ora1020\NLS_LANG setting in the registry is AMERICAN_AMERICA.UTF8
· The Regional and Language Options, Language for non-Unicode programs is Chinese (PRC) (and I applied to the default profile)
When I run the application in foreground it works fine – I can run a query in SQLPLUS against the table and see that
the field is updated with Chinese characters. and can dump the field and verify the data.
When I run the application as a service (initially under windows LOCAL SYSTEM account) it doesn’t work - after populating the table,
the query returns “??????” in the field.
I then changed the service to run under my account (the same one that works interactively) and again when I run the application
as a background service I get “??????” in the field.
Apparently somewhere the input data is getting mapped differently via the code page when running as a service vs in foreground
Any suggestions on how to troubleshoot this?
So far I have tried setting NLS_LANG as a SYSTEM ENV variable – I can’t think what else to try here.
Thanks, Marty