following problems:
I got a mysql database with chinese characters (stored as utf8_general_ci). In phpmyadmin the chinese characters a printed correctly.
Now I'm getting the database values with mysqli:
$stmt = $mysqli->prepare("SELECT *** FROM projects p WHERE PID = ***");
$stmt->execute();
$stmt->store_result();
$stmt>bind_result(***);
$stmt->fetch();
The chinese characters are now shown as '????'.
Page encoding is set to:
<meta charset="utf-8">
What am I doing wrong?
Thanks in advance.
You have to tell MYSQL that the communication done is going to be in UTF8 for this to work.
The easier is, after your connection to the database, to execute this query : SET NAMES 'utf8'
which will, once and until the disconnection, tell mysql that you are going to talk in UTF8.
The PHP file needs to have its encoding set as UTF8 and not ASCII.