0

When I execute the code at my end, the characters get saved correctly. But when the same code with the same data is executed at client side, the characters change when they are written to the database and that causes issues when they are displayed on a screen. The datatype of the column is varchar2.

Initially, I thought that the character set of the database at their end would be different from mine so I asked for the NLS parameters from the client. Turns out, the character set is the same but the language and territory is different. I think it could be causing this problem but I am not sure. If yes, how can I ask them to change it?

Paramter            Client        Me
NLS_CHARACTERSET    AL32UTF8      AL32UTF8
NLS_LANGUAGE        GERMAN        AMERICAN
NLS_TERRITORY       AUSTRIA       AMERICA

Please tell me if I need to put more information.

EDIT: Issue was not with the database character set, it was with the application. Fixed this issue after adding -Dfile.encoding=UTF-8 in jvm arguments.

siddhant
  • 35
  • 6
  • Try using `NVARCHAR` – Bohemian Jan 28 '20 at 06:02
  • It's not feasible to send another db release immediately. – siddhant Jan 28 '20 at 06:14
  • In many cases, Oracle isn't the issue but rather the software accessing Oracle. Even if you run SQLplus from a shell, it's more likely that the shell is the problem. Can you provide more information what other software and operation systems are involved? – Codo Jan 28 '20 at 07:07
  • @Codo, my java application is running on a linux server. – siddhant Jan 28 '20 at 09:15
  • Chances are the problem is in the Java app and not in Oracle. Can you provide more information about the Java app and how it processes data, how it is entered etc? – Codo Jan 28 '20 at 11:25

1 Answers1

0

You can either ask the user to perform following command (via cmd on windows) for the current session only

set NLS_LANG=GERMAN_AUSTRIA.AL32UTF8

and then start your app from the same session to test if possible.

Be aware that all the database messages will be automatically translated to German language, like this

SQL> jj
SP2-0042: Unbekannter Befehl "jj" - restliche Zeile wurde ignoriert.

This might be annoying in case you are sending "raw" oracle message to a non-german speaking client

Once test is successfully done, you might either set system variable NLS_LANG to a value a gave you before or go to registry editor on a client windows machine (if applicable) and set the NLS_LANG parameter value for the Oracle home under

HKLM\Software\Oracle

That will change the parameter for any session customer starts

ekochergin
  • 4,109
  • 2
  • 12
  • 19