after update occurs Turkish character problem

Discussion in 'Databases' started by OPETH, Oct 4, 2008.

  1. #1
    i was trying a data on website.First i created simple code.

    Here is

    <?php
    $mesaj=$_POST["mesaj"];
    $con = mysql_connect(*****************);
    
    
    if (!$con)
      {
      die('Could not connect: ' . mysql_error());
      }
    
    mysql_select_db("derslerioku", $con);
    
    
    
    $query="UPDATE dersler SET dersicerik='$mesaj' WHERE id='12'";
    $result=mysql_query($query);
    
    echo $mesaj;
    mysql_close($con);
    
    ?>
    
    Code (markup):
    This simple code works. But Some characaters appears incorrectly and " ' " the character dont update.
    For example if i write 'myname' , it doesnt update but if you write "myname" ,it update.

    i use

    HTML SOURCE CODE:<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9">

    MY DATABASE:
    utf8_general_ci(phpmyadmin of host firm)

    and

    mysql_select_db("derslerioku", $con);



    mysql_query("SET NAMES 'latin5'");
    mysql_query("SET CHARACTER SET latin5");
    mysql_query("SET COLLATION_CONNECTION = 'latin5_turkish_ci'");

    i want to update full of Turkish. How i can solve the problem.
     
    OPETH, Oct 4, 2008 IP
  2. darkhorn

    darkhorn Peon

    Messages:
    43
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    use only utf8 for Turkish sites

    ben bu konunun ustası değilim ama her yerde utf8'i kullan, başına bir dert gelmez. ben içerisinde hem Bulgarca olan hem de Türkçe olan (sayfalar) bişeyler yazmak istediğimde bir sürü problemle karşılaşmıştım ama nihayetinde utf8 kurtarıcım oldu.

    you will not have problems if u use only utf8 (i think)
     
    darkhorn, Oct 11, 2008 IP