2

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
  • 1
    Are you sure that you have the right database character set? Commented Nov 17, 2009 at 2:36
  • yeah. when i type directly through pl/sql and save the nihongo data it is successfully saved. but when i use my app with hibernate it saves inverted question marks Commented Nov 17, 2009 at 3:23

1 Answer 1

3

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"))

Sign up to request clarification or add additional context in comments.

3 Comments

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.
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.
Whew.. After a week of troubleshooting. This solved my problem. I created a new instance of db using AL32UTF8 charset. Tnx .. :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.