We have an Oracle DB using UTF-8 (NLS_CHARACTERSET = AL32UTF8). We then have a J2EE application in Glassfish which uses Hibernate.
While using SQL Plus or SQL Developer we can read and write the data correctly but we are not able to get special characters programmatically.
Reading an ä we get √§
Looking at similar questions I tried:
tuning Hibernate properties
<property name="hibernate.connection.characterEncoding" value="utf8" />adding the
defaultNChar=trueconnection property in Glassfishadding the
defaultNCharconnection property through Hibernate<property name="hibernate.connection.defaultNChar" value = "true"/>setting the charset to
utf8<property name="hibernate.connection.charSet" value="utf8" />
But I'm still not able to get any character which is not basic ASCII.
Any hint on what am I doing wrong?
Edit: with get I mean fetch with a select statement. Checking with a debugger or comparing with the correct (e.g., "ä") string with an assertion.