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 ?
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 ?
You need to change the table collation to UTF8
alter table *table_name* CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci
Consider if this is the query,
$test = "...SQL Query...";
$result = mysql_query($test);
Just add this alone in above of $test
$result = mysql_query("SET NAMES utf8");
Your final code should be,
$result = mysql_query("SET NAMES utf8");
$test = "...SQL Query...";
$result = mysql_query($test);
Also, add this line at the top,
header('Content-Type: text/html; charset=utf-8');