I'm trying to get column names with Turkish characters. Here is the code.
$cekelim=mysql_query("SELECT * FROM kategori");
$sayisi=mysql_num_fields($cekelim);
for($i=0;$i<$sayisi;$i++){
$listeleyelim=mysql_field_name($cekelim,$i);
echo $listeleyelim."<br>";
}
And I used these codes in the beginning of php file
mb_internal_encoding('UTF-8');
mysql_query('SET NAMES UTF8');
mysql_query("SET CHARACTER SET utf8");
mysql_query("SET COLLATION_CONNECTION = 'utf8_turkish_ci'");
And also I used
<meta http-equiv='Content-Type' content='text/HTML; charset=utf-8' />
between head tags in html.
Edit1:
Adding
header('Content-Type: text/html; charset=ISO-8859-9');
fixes ü and ö but doesn't work for only-in-Turkish characters.
Edit2:
I replaced all Turkish characters with numerical codes such as ç and I'm replacing all Turkish characters with numerical codes when inputting a new column. This is not the exact way I was looking for but this alternate way works fine.