I need to save text with language specific caracters in a mysql database.
I have setup the table and the field with utf8_general_ci
The test.php file to write into the database is also in utf8_general_ci:
<?php
include 'connect.php';
$x=$_GET["x"];
$d="INSERT INTO `test`
(`car`)
VALUES (' $x ')";
echo $d;
$resultins = mysql_query($d);
echo mysql_error();
echo "<br>".$id;
?>
In the browser I do:
/test.php?x=Vietnam_ờ_French_ç_German_ä
and the echo gives:
INSERT INTO test
(car
) VALUES (' Vietnam_á»_French_ç_German_ä ')
In database I get:
When I retrieve this data in another php and display it in the browserI get:
What am I missing?