Quote:
Originally Posted by Zhen-Xjell
Speaking of which, did you want the hex?
|
Well I noticed on castlecops you still have the foreign chars in the actual URI's. My problem with that is that no-one showed me evidence that these chars are actually valid in a URI. I've changed a lot since then but I used this function to convert foreign chars to their english equivalent:
PHP Code:
// function to replace foreign chars with their english equivalent
function remove_accents($text)
{
$trans = get_html_translation_table(HTML_ENTITIES);
foreach($trans as $literal =>$entity)
{
if(ord($literal) >= 192)
{
$replace[] = substr($entity, 1, 1);
$search[] = $literal;
}
}
return str_replace($search, $replace, $text);
}