Turkish characters are not displayed correctly [duplicate]

You can try explicitly adding content type at the top of your file as below

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

and remove the below from your code..

header('Content-Type: text/html; charset=ISO-8859-9');

Update:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<?php echo "for example Ş and İ "; ?>   
</body>
</html>

The above code gives me the below output:

enter image description here

Leave a Comment