I have a mysql database backup. And this backup collation is utf8-general-ci. This is a backup from vbulletin.
Here is a sentence from an article in database:
Ticaret Merkezi sizin ticaret yapmanýzý saðlayan müthiþ bir platformdur. Bu platformda internet ile baðý olmayan tüccarlar için ticaret yapma olanaðý saðlanmýþtýr. Bazý nedenlerden dolayý kendine site kuramayan tüccarlar burada kendi ürünlerini tanýtabilecek ve yine burada bir çok tüccar ile sohbet edebilecek.
Bir çok satýcý ve müþteri arasýnda bað kuracak bu sistem sayesinde ticaret daha kolaylaþacak.
my html code is like that
<html lang="tr">
<head>
<meta charset="utf8">
</head>
</html>
If i don't use lang='tr' and charset='utf-8'. My data turns to this
Ticaret Merkezi sizin ticaret yapmanýzý saðlayan müthiþ bir platformdur. Bu platformda internet ile baðý olmayan tüccarlar için ticaret yapma olanaðý saðlanmýþtýr. Bazý nedenlerden dolayý kendine site kuramayan tüccarlar burada kendi ürünlerini tanýtabilecek ve yine burada bir çok tüccar ile sohbet edebilecek.
Bir çok satýcý ve müþteri arasýnda bað kuracak bu sistem sayesinde ticaret daha kolaylaþacak.
But lang='tr' and charset='utf-8' is not converting everything.
In fact, i have no problem with this issue. But this articles was saved into database like that.
How can convert these characters ? I don't want to use str_replace.
ý => ı, ð => ğ, þ => ş etc.
My Database Connection Part
public function __construct() {
$this->db_connection = mysql_connect($this->_server, $this->_dbuser, $this->_dbpassword) OR die ("Veritabanı Sunucusuna Bağlanılamadı!" . mysql_error() );
mysql_query('SET NAMES utf8');
mysql_query('SET CHARACTER_SET utf8');
mysql_query("SET COLLATION_CONNECTION = 'utf-8'");
mysql_select_db($this->_db) or die("Veritabanı Bulunamadı" . mysql_error() );
}