facebook

Hibernate insert Greek strings [closed]

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #222401 Reply

    dsarris
    Member

    Hi,

    in my project I have to insert Greek strings in a table in my database (MySql 4.1.6-GAMMA).

    I use Hibernate to map those tables. However, whenever I try to save a String the String is not saved correctly in the Datatbase.

    Do I have to do something special in the Hibernate or Java code?
    Do I have to do something special in the MySQL DB table declaration?

    #222409 Reply

    Greg
    Member

    Did you look at the Hibernate Quickstart? It shows how to create hibernate mappings for a table and then it inserts a new row into the database. It is also using just plain strings.

    #222453 Reply

    dsarris
    Member

    My problem was not just saving in the DB. But saving non-Latin strings in teh DB. However, the problem was not in the Hibernate mappings and the corresponding Java code, but in the configuration of the DB (MySQL). I had to select “utf8” as the DB character set.

    Thanks for your reply

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Hibernate insert Greek strings [closed]

You must be logged in to post in the forum log in