From b4d5ec01a92b49d02bc459dcdced0eab41f6729a Mon Sep 17 00:00:00 2001 From: james Date: Thu, 11 Feb 2010 18:13:15 +0000 Subject: [PATCH] Fix encoding problems on firstname/lastname (and all user_personal) fields --- user_personal.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user_personal.php b/user_personal.php index 71b34ce..ac01d9d 100644 --- a/user_personal.php +++ b/user_personal.php @@ -113,7 +113,7 @@ case 'save': $save = true; /* Set values */ foreach($fields as $f) { - $u[$f] = stripslashes($_POST[$f]); + $u[$f] = iconv("UTF-8","ISO-8859-1",stripslashes($_POST[$f])); /* Allow the user to clear a field regardless of regex */ if($u[$f] == '') continue; @@ -159,7 +159,7 @@ case 'save': if($save == true) { user_save($u); - happy_("%1 %2 successfully updated",array($_POST['firstname'],$_POST['lastname'])); + happy_("%1 %2 successfully updated",array($u['firstname'],$u['lastname'])); } //reload the user record because we dont know if we saved or didnt save above, we just want