Im having an issue at the moment where my testing environment is not persisting the trademark character "™" in the database. When I enter in the form data, then submit it, I can see that on the server side, the request has the correctly encoded ™ character, but then when the call to hibernate's "saveOrUpdate()" method is called, the data in the table shows up as an upside down question mark.
Im using SqlDeveloper to inspect the table, and I can manually change the character to a ™ by pasting directly into the row then committing, and it works.
So I have made the assumption that hibernates methods of persistence are not working correctly.
Im at a loss here, really, I just dont know what to try, I have set the:
<property name="connection.useUnicode">true</property>
<property name="connection.characterEncoding">utf-8</property>
properties in the config file, with no luck.
My columns in the tables are NVARCHAR2(400 CHAR) (although they were originally, just VARCHAR2 to start with, but I changed them during the debugging of this issue).
Any help here is greatly appreciated.
Mark
Ok, so it turns out that what I needed to do was to set the defaultNChar connection property to true.
I did this via the context file for my app in Tomcat.
The article that enlightened me was here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With