Friday, May 2, 2008

Stripping Accennts From Text With PHP

Most of the PHP string functions don't really work with UTF-8 encoded strings (http://bugs.php.net/bug.php?id=35520). I found this post on the Symfony forums that had a solution.


$text = iconv('UTF-8', 'ASCII//TRANSLIT', $text);


Done and done.

No comments: