Search code examples
phpmysqlunicodeunicode-string

Unicode message inserting in different way - php


I'm trying to insert a Unicode message in my database.

+9195******** पर मुझे फोन

Its inserting like the below line.

+9195******** पर मà¥à¤à¥‡ फोन

Can anybody tell me how to overcome this issue ?


Solution

  • You need to change the table collation to UTF8

    alter table *table_name* CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci