From a42e042bccdb1f39de98e3c4b7e493469e9d84aa Mon Sep 17 00:00:00 2001 From: james Date: Thu, 11 Feb 2010 16:41:17 +0000 Subject: [PATCH] Fix once and for all the communication module with french/accented characters -- since fckeditor only does utf8, do the conversion immediately to ISO when its submitted, and then allow the system to use ISO everywhere from there on out --- admin/communication.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/admin/communication.php b/admin/communication.php index d729b1b..c6a3ddc 100644 --- a/admin/communication.php +++ b/admin/communication.php @@ -157,6 +157,11 @@ case 'email_save': /* Allow the fundraising campaigns id to be NULL, it'll never be 0 */ $fcstr = ($fcid == 0) ? 'NULL' : "'$fcid'"; + $bodyhtml=iconv("UTF-8","ISO-8859-1",$bodyhtml); + $name=iconv("UTF-8","ISO-8859-1",$name); + $description=iconv("UTF-8","ISO-8859-1",$description); + $from=iconv("UTF-8","ISO-8859-1",$from); + $subject=iconv("UTF-8","ISO-8859-1",$subject); $body=getTextFromHtml($bodyhtml); mysql_query("UPDATE emails SET @@ -735,12 +740,12 @@ case "email_get_list": echo ""; echo ""; echo "Date:".date("r").""; - echo "Subject:".htmlspecialchars(iconv("UTF-8","ISO-8859-1//TRANSLIT",$r->subject)).""; + echo "Subject:".htmlspecialchars($r->subject).""; if($r->bodyhtml) { - $body=iconv("UTF-8","ISO-8859-1//TRANSLIT",$r->bodyhtml); + $body=$r->bodyhtml; } else { - $body=nl2br(htmlspecialchars(iconv("UTF-8","ISO-8859-1//TRANSLIT",$r->body))); + $body=nl2br(htmlspecialchars($r->body)); } echo "".$body."";