From 79fd717010f0779cfc89e85a3a9d7c353a32e273 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 21 May 2007 00:41:46 +0000 Subject: [PATCH] =?UTF-8?q?Pr=E9paration=20gestion=20UTF8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/translate.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/translate.class.php b/htdocs/translate.class.php index bd812eefc2c..37e4328fc9e 100644 --- a/htdocs/translate.class.php +++ b/htdocs/translate.class.php @@ -40,6 +40,8 @@ class Translate { var $tab_loaded=array(); // Tableau pour signaler les fichiers deja chargés var $tab_translate=array(); // Tableau des traductions + var $charset='ISO-8859-1'; // Codage du contenu du fichier langue + /** * \brief Constructeur de la classe @@ -232,8 +234,10 @@ class Translate { $newstr=ereg_replace('<','__lt__',$str); $newstr=ereg_replace('>','__gt__',$newstr); $newstr=ereg_replace('"','__quot__',$newstr); + // Cryptage en html de la chaine - $newstr=htmlentities($newstr); + $newstr=htmlentities($newstr,ENT_QUOTES,$this->charset); + // On restaure les tags HTML $newstr=ereg_replace('__lt__','<',$newstr); $newstr=ereg_replace('__gt__','>',$newstr);