[eluser]ckelly06[/eluser]
Hey guys,
I just spent the last half hour scouring Stackoverflow, this forum (which has this question posted several times but no solutions that worked for me) and Google but haven't had any luck. I simply need my form to accept accented characters like "é" when I use the alpha_dash validation function. I found one solution that said to do it this way:
Code:
$str = utf8_encode($str);
return ( ! preg_match("/^([\p{L}a-zA-Z0-9]*)$/i", $str)) ? FALSE : TRUE;
But it's not working. Does this have to do with not properly encoding my page in UTF-8? I have this in the <head> section...
Code:
<meta http-equiv="content-type" c />
and this in .htaccess
Code:
AddDefaultCharset UTF-8
because I read a couple articles saying to do that. Still no luck. How do I fix this problem?
Thanks in advance!