I have two servers. Each runs PHP/MySQL. I paste a 6-character string from my clipboard into newly created tables in both databases. Inspection of the table column shows that the charset and collation are set to "utf8" and "utf8 general ci" on both servers. I then run the following identical script on both servers.
<meta charset="utf-8">
<?php
$sql = "SELECT * FROM temp";
$link=mysqli_connect($DB_SERVER,$DB_LOGIN,$DB_PASSWORD,$DB);
$result=mysqli_query($link,$sql);
mysqli_close($link);
$row=mysqli_fetch_object($result);
$details=$row->details;
echo $details;
?>
One server sends the following to the screen
‘good’
the other sends this to the screen in the same browser (Firefox)
‘good’
Can anyone spot the problem or suggest how I can troubleshoot this?