I am trying to insert some names in mysql database by using mysqli commands. The problem is whenever the Turkish character ü comes in text, the text in the database becomes just previous part of that character.
For example I try to insert : Humana Still Tee Anne Sütünü Arttıran Bitki Çayı
The text in database : Humana Still Tee Anne S
The column in database is a text column has utf-8 general_ci standards.
And these are my codes for inserting
function mysqli_connector()
{
$link = mysqli_connect(DB_HOSTNAME,DB_USERNAME,DB_PASSWORD,DB_DATABASE) or die("hata");
$link->set_charset("utf8");
mysqli_set_charset($link,"utf8");
return $link;
}
function oc_product_description($p_id,$name){
$link = mysqli_connector();
$link->query("insert into oc_product_description (product_id,name,language_id,meta_title)values('$p_id','$name','1','$name')")or die(mysqli_error($link));
mysqli_close($link);
}
oc_product_description(106,"Humana Still Tee Anne Sütünü Arttıran Bitki Çayı");
The problem occurs for ü letter i tried with other Turkish characters, it works fine.
Thanks for your time.