Problem with ctype_alnum and locale special characters
Posted: Fri Mar 24, 2006 8:00 pm
I have this on my source code, but it does not work:
And the locale is there:
I want ctype_alnum to recognize characters like á,ó,ú, etc... is this possible? someone has done it?
Thanks.
Code: Select all
setlocale(LC_ALL, 'es_CL.utf8');
// Do add result
$clean = array();
if (isset($_POST["name"]) && !empty($_POST["name"]) && ctype_alnum($_POST["name"]) && strlen($_POST["name"]) < 50) {
$mysql["name"] = clean_input($_POST["name"]);
}
else{
//display error
}Code: Select all
dan@www:~$ locale -a | grep CL
es_CL.utf8Thanks.