$search = array('&','€','"',"'",'<','>','?','?','?','?',
'?','?','?','?','?','?','?','?','?','?',
'?','?','?','?','?','?','?','?','?','?','?','?',
'?','?','?','?','?','?','?','?','?','?','?','?',
'?','?','?','?','?','?','?','?','?','?','?','?',
'?','?','?','?','?','?','?','?','?','?','?','?','?','?',
'Ä','ä','Ë','ë','Ï','ï','Ö','ö','Ü','ü',
'Ÿ','ÿ','ß','©','®','™','«','»','•',
'·','¨','…','¡','¿','¦','§','º','ª','¯',
'¶','†','‡','°','¢','£','¤','¥','ƒ','±',
'÷','×','v','?','¹','²','³','´','¸','‰',
'µ','¬','½','¼','¾','À','Á','Â','Ã','Å',
'Æ','Ç','È','É','Ê','Ì','Í','Î','Ð','Ñ',
'Ò','Ó','Ô','Õ','Ø','Œ','Ù','Ú','Û','Ý',
'Þ','à','á','â','ã','å','æ','ç','è','é',
'ê','ì','í','î','ð','ñ','ò','ó','ô','õ',
'ø','œ','ù','ú','û','ý','þ','Š','š','?',
'?','G','?','?','?','?','T','?','?','?',
'?','?','?','?','?','?','S','?','?','F',
'?','?','O','a','ß','?','d','e','?','?',
'?','?','?','?','µ','?','?','?','p','?',
'?','s','t','?','f','?','?','?',
'I','i','G','g','S','s','£');
$replace = array('&','€','"',''','<','>','?','?','?','?',
'?','?','?','?','?','?','?','?','?','?',
'?','?','?','?','?','?','?','?','?','?','?','?',
'?','?','?','?','?','?','?','?','?','?','?','?',
'?','?','?','?','?','?','?','?','?','?','?','?',
'?','?','?','?','?','?','?','?','?','?','?','?','?','?',
'Ä','ä','Ë','ë','Ï','ï','Ö','ö','Ü','ü',
'Ÿ','ÿ','ß','©','®','™','«','»','•',
'·','¨','…','¡','¿','¦','§','º','ª','¯',
'¶','†','‡','°','¢','£','¤','¥','ƒ','±',
'÷','×','√','∫','¹','²','³','´','¸','&permill;',
'µ','¬','½','¼','¾','À','Á','Â','Ã','Å',
'Æ','Ç','È','É','Ê','Ì','Í','Î','Ð','Ñ',
'Ò','Ó','Ô','Õ','Ø','Œ','Ù','Ú','Û','Ý',
'Þ','à','á','â','ã','å','æ','ç','è','é',
'ê','ì','í','î','ð','ñ','ò','ó','ô','õ',
'ø','œ','ù','ú','û','ý','þ','Š','š','Α',
'Β','Γ','Δ','Ε','Ζ','Η','Θ','Ι','Κ','Λ',
'Μ','Ν','Ξ','Ο','Π','Ρ','Σ','Τ','Υ','Φ',
'Χ','Ψ','Ω','α','β','γ','δ','ε','ζ','η',
'θ','ι','κ','λ','μ','ν','ξ','ο','π','ρ',
'ς','σ','τ','υ','φ','χ','ψ','ω',
'?','?','?','?','?','?','?');
$v = str_replace($search, $replace, $v);
$v = mysql_real_escape_string($v);