First I tried, utf8 encode-decode, failed,
changed file format from ASCII to UTF-8,
tried utf encode again,
changed file format several times and failed.
Then i found out "iconv", tried and failed.
Changed locale with "setlocale". Tried Turkish, English and other types, failed.
At last i wrote this function and I'm happy with the output :)
function transliterateTurkishChars($inputText) {
$search = array('?', '?', '?', '?', '?', '?', '?', '?', '?', '?', 'ü', 'ü');
$replace = array('c', 'C', 'g', 'G', 'i', 'I', 'o', 'O', 's', 'S', 'u', 'U');
$outputText=str_replace($search, $replace, $inputText);
return $outputText;
}
$goodText=transliterateTurkishChars($badText);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…