Showing posts with label accents. Show all posts
Showing posts with label accents. Show all posts

Monday, February 12, 2007

remove accents from strings using postgresql

function remove_accents(&$str)
{
return svq("select convert(TO_ASCII(convert('".pg_escape_string($str)."','UNICODE','LATIN 1'),'LATIN 1'),'LATIN 1','UNICODE');");
}