If my straight html pages contain an mdash character these are correctly rendered in different browsers on both my Android mobile phone (Samsung) and my Windows PC. If however this character is contained in text loaded from MySQL/php it correctly renders on the PC, but as the three characters – on various browsers on my phone.
My page header is:
and my php contains:
Three examples here
My page header is:
Code:
<!DOCTYPE HTML>
<html lang='en'>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
and my php contains:
Code:
$db = new PDO("mysql:host=localhost;dbname=XXXXX", 'XXXXXX', 'XXXXXXXXXXXXXXXXX',array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
$Temp="SELECT * FROM tbpeople WHERE pID = :id";
$q=$db->prepare($Temp);
$q->bindvalue(':id', $id);
$q->execute();
$result=$q->fetch(PDO::FETCH_ASSOC);
Three examples here