Try this 1. method if not succes 2.metod. Last method i say open HTML File with notepad2 editor and change encoding from File menu to UTF8 and save. i think it will be solution;
- Method
$dsn = $config ["driver"] . ':dbname=' . $config ['dbname'] . ';host=' . $config ['host'];
. ';charset=UTF-8'; //---> this is the solution
try {
$this->link = new PDO ( $dsn, $config ['user'], $config ['pass'] );
// The mysql driver ignores the charset directive in $dsn (yeah, that sucks)
if ($config ["driver"] == 'mysql')
$this->link->exec ( "set names utf8" );
}
catch ( PDOException $e ) {
die ( "Hata var : " . $e->getMessage () );
}
Other:
$encodings = array("windows-1254","utf-8", "iso-8859-9" );
$data = file_get_contents($TempSrc);
$data=mb_convert_encoding($data, 'UTF-8', mb_detect_encoding($data, $encodings));