I have problems with Turkish special characters my encoding system is ISO-8859-9 charset in headers and server.
//Database connections
include_once("ogr_con.php");
require_once("oraunit.php");
function strtoupper_tr($string){
$upper=array("ü" => "Ü", "ö" => "Ö", "ğ" => "Ğ", "ş" => "Ş", "ç" => "Ç", "i" => "İ", "ı" => "I");
return strtoupper(strtr($string,$upper));
}
function strtolower_tr($string){
$low=array("Ü" => "ü", "Ö" => "ö", "Ğ" => "ğ", "Ş" => "ş", "Ç" => "ç", "İ" => "i", "I" => "ı");
return strtolower(strtr($string,$low));
}
$adi= strtolower_tr($_GET["q"]);
$adi[0]=strtoupper($adi[0]);
$soyadi= strtoupper_tr($_GET["q"]);
if (!$adi) return;
$adiquery="SELECT K.ADI||' '||K.SOYADI AS FLNAME
FROM personel.kisi k
WHERE K.ADI LIKE '%".$adi."%' OR K.SOYADI LIKE '%".$soyadi."%')";
$aq=oraArray($con, $adiquery, array());
if(is_array($aq)){
while(list($sno,$u)=each($aq)){
$uadi = $u['FLNAME'];
echo "$uadi\n";
}
}
- Functions
strtoupper_tr
andstrtolower_tr
not working for special characters. $uadi
- when this values is returned not displayed properly in textbox.<script type="text/javascript">
$(document).ready(function() {
$("#fuadsoyad").autocomplete("get_name.php", {
width: 260,
matchContains: true,
selectFirst: false
});
});
</script>
Can anyone help me solve this problem?
What do you advice me to do?