以下[重复]的正确字符编码是什么

This question already has an answer here:

im having a string like this which im trying to save to my mysql database

$str = "The size id 9” x 12” and some other";

here the is not the regular "

Its a part of an Ajax response,In the php side this is what im using

header("Content-Type: text/html; charset=utf-8");
echo $this->_helper->json(array("string is" => $str));

My but console shows 9[a sqaure box] x 12[a square box] //actually a square box cant able to paste it

And im saving this string to my database which has the charset utf8mb4 which is also not correct (ignores the ” in the table while saving)

Can somebody show me which charset i need to use for both showing in html and saving in mysql

</div>

utf8_encode will do the trick.

Then utf8_decode when you print.