troubleshooting Question

utf8 to latin5

Avatar of btocakci
btocakciFlag for Turkey asked on
5 Comments1 Solution1012 ViewsLast Modified:
i wrote a function to convert some unenglish characters to turkish characters

function link_olsun_lan($word) {
$word = strtolower($word);
$word = str_replace("ç","c",$word);
$word = str_replace("Ç","c",$word);
$word = str_replace("ö","o",$word);
$word = str_replace("ü","u",$word);
$word = str_replace("Ü","u",$word);
$word = str_replace("","g",$word);
$word = str_replace("","g",$word);
$word = str_replace("Ö","o",$word);
$word = str_replace("1","i",$word);
$word = str_replace("0","i",$word);
$word = str_replace("_","s",$word);
$word = str_replace("^","s",$word);
return $word;

but this function works if the parameter $word is in latin5 format.if the parameter $word is in utf8 format this function does not work.i think for example the character 'Ç' does not equal exactly 'Ç'.thus the function does not change the character 'Ç' with character c.what kind of way do i have to fallow to solve this problem.
Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros