0

I am having issue saving Hindi and other languages text in MYSQL. CharSet of Table is set to utf8, with Collation utf8_unicode_ci (I even tried utf8_general_ci)

I can save Hindi or any language if I use MySQL Workbench. And when I fetch data from my website it displays fine. But when I try to edit and save Hindi text or save new hindi text it saves as ?????.

In debug I see that right before saving data in database the values in variables are in hindi.

I am using Java, Eclipse, Hibernate and Spring. Do you think Hibernate or Spring is doing something here that data is not saving in Hindi. Because when I update the table directly using MySQL Workbench then it saves fine.

1 Answers1

0

Well, I tried by adding this parameter in the database url ?characterEncoding=UTF-8 and it worked.

  • as this is a solution to your particular problem, the question of yours doesn't have enough details to deduce your problem. In future when dealing with various databases, the DB can have set different encodings in server, database, table and even a single column, where fixing the encoding issue just with encoding param in url connection won't fix the problem. – itwasntme Feb 23 '20 at 07:50