My Database has as
All of my Databases have:
My Mainpage is saved as utf8, has utf8-meta-charset and a php utf8-header. So is my Ajax-loaded Page. However, characters like ä, ö, ü are displayed: "?"
If I set the names at the beginning of my mainpage
set names utf8 COLLATE 'utf8_general_ci'
The Ajax-loaded Content is correct but my mainpage ö,ü... are displayed "?" The Mainpage content is via mb_detect_encoding($str)
; still utf8...
Where should I look?
Note: Every Content is included via include_once So index.php->loged.php->content.php
To get your site working with UTF-8:
$mysqliDb->set_charset('utf8');
I tried to point out all important points in this short article.
EDIT:
For PDO the syntax to set the charset would be:
$dsn = "mysql:host=$dbHost;dbname=$dbName;charset=utf8";
$db = new PDO($dsn, $dbUser, $dbPassword);
you can try to do mysqldump, review the contents of the dump to make sure content is utf-8 encoded. If not, convert it to utf-8 and import dump back.
if that will fix your problem, then a script which save data into your database saves it in the wrong encoding.