1) I have a table tbl_Data
in database which has name
column with text comparision method (?) property set toutf8_polish_ci
. Works as a charm, when I'm browsing tbl_Data
through phpMyAdmin.
2) In my html code I've got:
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
so seems like I'm sending proper encoding headers for browser...
3) My PDO dsn contains ;charset=UTF-8
, followed from php manual.
4) In my php code I use:
foreach(parent::query('SELECT ID,PLName,LatinName from tbl_Data') as $row) {
$result = $result."
<tr>
<td>".utf8_encode($row['PLName'])."</td>
</tr>
";
}
Having all of this I'm still getting 'garbage' (=?
) chars instead of proper polish letters, though some of them are displaying well (phpMyAdmin shows all properly). What I am missing here? Please advice, fellows!
My MySQL Engine is InnoDB
, webserver: nginx
with fpm if it is revelant...