• Post Reply Bookmark Topic Watch Topic
  • New Topic

Storing Japanese, from swing input box to MySQL.  RSS feed

 
Em Aiy
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to save japanese input from the user into the MySQL database, using Hibernate.

If i try to save data in table using mysql console in the table of datatype "text", it works fine. it save and display the value in console.

But if do it using swing input box, the data is not saved i.e QUESTION MARK are saved and retrieved.

Can you people help me out to fix it a.s.a.p.

One more thing, the same thing is working fine on MS-SQL but not on MySQL.
 
karthikeyan Chockalingam
Ranch Hand
Posts: 259
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://www.oop-reserch.com/mysql.html

The above link may help you. Please refer to the section And MySQL can be!

Note: You should have enabled Mysql to store unicode during installation.
 
Em Aiy
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok i am trying to do something from scratch. trying to insert data (japanese data) using a temp class extended from jframe.

here is the code for data insertion.



I have even tried to put the unicode argument on and characterset=utf8 but in vai.




P.S:
I have not used utf-8 in connection string, because while searching i found to use utf8 instead of utf-8 in connection string and it was mentioned in MySQL website.
 
Em Aiy
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks karthi keyan

but as i have told you earlier that we are using HIBERNATE as db layer. so i can't do this explicit manipulation for each field.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!