Posts Tagged ‘utf-8’

If you need to convert accented characters to plain ones such as ğ to g, ä to a, ß to ss, here is the good news. Wordpress has already done this and you can freely use their implementation. I shortened the function a bit (remove the ‘remove accents for latin-1 charset’ part). You can find the original version in wp-inlcludes/formatting.php under the name of remove_accents or you can check formatting.php online at this site.

Usage:

echo remove_accents("ĞÜŞİÖÇÄËÏÃ ğüşıöçäëïã ");
//output: 'GUSIOCAEIA gusiocaeia'

(more…)

Categories: Coding
Tags: ,
continue >