Hello,
I need some help.
I have a MySql DB, and some fields have Japanese values.
DB collate is set to: utf8_general_ci
When I check for a specific register with PhpMyAdmin, values with japanese characters display ok, but when I try to get the same register to show it using php I got "???" characters. I have tried everything and still without solving this. here is my code:
<?php
header("Content-type: text/html; charset=utf-8");
include("core/scripts/db_connection.php");
$query = "SELECT `logdownloadid`, `stitle` FROM `downloadstats` WHERE `country` = 'CHINA'";
$result = mysql_query($query);
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Radio and Television Service Statistics </title>
<link rel="stylesheet" href="core/css/default2.css" type="text/css" media="screen"/>
<?php
while($row = mysql_fetch_array($result))
{
echo $row[0]." : ".$row[1]."<br>";
echo $row[0]." : ".utf8_encode($row[1])."<br>";
echo $row[0]." : ".htmlentities($row[1], ENT_QUOTES, 'UTF-8')."<br>";
}
?>
</head>
<body>
</body>
</html>
The JAPANESE characters doesn't display well using utf8_encode nor htmlentities.
HELP!!!