php json_encode utf8 char problem ( mysql ) [duplicate]

请求翻译

This question already has an answer here:

I am writing to the database in the form of data from a form with jQuery json_encode.

However, data from the database will corrupt.

$db->query("SET NAMES utf8");

$kelime = array("Merhaba","Dünya");
$bilgi = json_encode($kelime);

$incelemeEkle = "
INSERT INTO incelemeRapor SET
bigData = '".$bilgi."'
";
$db->query($incelemeEkle);

Database Table Schema;

CREATE TABLE `incelemeRapor` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `bigData` text COLLATE utf8_unicode_ci,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

MySQL Inserted Example Data;

["Merhaba","Du00fcnya"]

5个回答