We have an app that inputs records into mysql. Have had problems with punctuation flowing from them not displaying right in website browser. Particularly the so called 'possessive apostrophe' and 'possessive double quotes'. Sometimes its a black diamond containing a question mark, other times the field is simply blank.
I have tried various things to stop them. I set all my mysql tables and fields to
utf8mb4_unicode_ci
Put this in php script that adds or updates records
$mysqli->set_charset("utf8mb4");
Everything I put in the db goes thru
$Description = $mysqli->real_escape_string($Description);
When present they break the input field or textarea even after adding this.
$Description = htmlspecialchars($Description, ENT_QUOTES);
Can remove them from table when they show up like this
UPDATE `Table` SET `Description`=REPLACE(`Description`,'’','');
Took a while track down that they can be stopped from being created by turning off "Smart Punctuation" in ipad keyboard settings.
Still I am wondering how to handle them correctly in an html form so field values are not blank or malformed.