Hi. Im trying to insert data with japanese characters to an oracle database. The things is what is saved in the database are bunch of inverted question marks. HOw do I resolve this
+2
A:
See http://www.errcode.net/blogs/?p=6 to determine the encoding of your database. I'm currently using Oracle with Hibernate in UTF-8 with no extra configurations.
Aslo, you might want to check whether the input values come correctly encoded. For example, if you have a web application, check the request parameter encoding (or set it, with request.setCharacterEncoding("utf-8")
)
Bozho
2009-11-17 07:07:20
I am using oracle database to with hibernate. Current encoding of my database is WE8MSWIN1252. anyway i can save nihongo characters successfully though through PL/SQL. The values I inserted too do not come from page forms.. I initially hard coded the values in my DAO to check if the problem is with the request encoding or with the hibernate itself.
cedric
2009-11-17 07:25:39
Well, there goes your problem - change the encoding to UTF-8 (not 1252). The fact that it worked from some place, doesn't mean the settings are correct. And hard-coded values are affected by the java file encoding, or VM encoding - too many variables to check.
Bozho
2009-11-17 07:34:15
Whew.. After a week of troubleshooting. This solved my problem. I created a new instance of db using AL32UTF8 charset. Tnx .. :)
cedric
2009-11-17 10:03:08