0

I am trying to store Marathi(Indian language) in MySQL database. I am getting the data from text box and trying to store it in database.

But, after executing the code, the data is stored like %^$^^^66 or other special characters which are not in Marathi(Indian language).

I had created database with utf8_general_ci collation.

Please help me.

A J
  • 3,970
  • 14
  • 38
  • 53
  • Since Hindi uses the Devnagri Script like Marathi, see this related question: http://stackoverflow.com/questions/12435867/how-to-store-the-data-in-unicode-in-hindi-language – A J Nov 11 '16 at 05:05
  • Possible duplicate of [Store hindi words in MYSQL using JAVA web crawler](http://stackoverflow.com/questions/11590713/store-hindi-words-in-mysql-using-java-web-crawler) – Tanmay Baid Nov 11 '16 at 05:13

2 Answers2

0

If you have database charset is utf8 and database collation is utf8_general_ci then there should not be any problem.

Check your data which is coming from text box is unicode or not.

To verify the database you can simply insert Marathi words directly into the table.

PVR
  • 885
  • 9
  • 18
0

try to change your table structure ALTER TABLE MODIFY CHARACTER SET UTF8;

if table already exist

raj
  • 1
  • 2