From d99b9356c3d59c1eb3d0a05216d119daefaf28e3 Mon Sep 17 00:00:00 2001 From: alecpl Date: Thu, 9 Oct 2008 12:54:21 +0000 Subject: - set mbstring's internal encoding in proper place --- program/include/iniset.php | 5 +++++ program/include/main.inc | 8 +++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/program/include/iniset.php b/program/include/iniset.php index 5fe10114d..f81c04a90 100755 --- a/program/include/iniset.php +++ b/program/include/iniset.php @@ -62,6 +62,11 @@ if (!ini_get('safe_mode')) { set_time_limit(120); } +// set internal encoding for mbstring extension +if(extension_loaded('mbstring')) + mb_internal_encoding(RCMAIL_CHARSET); + + /** * Use PHP5 autoload for dynamic class loading * diff --git a/program/include/main.inc b/program/include/main.inc index 0214d32f1..9223e26f8 100644 --- a/program/include/main.inc +++ b/program/include/main.inc @@ -207,12 +207,10 @@ function rcube_charset_convert($str, $from, $to=NULL) } } - // settings for mbstring module (by Tadashi Jokagi) - if (is_null($mbstring_loaded)) { - if ($mbstring_loaded = extension_loaded("mbstring")) - mb_internal_encoding(RCMAIL_CHARSET); - } + if (is_null($mbstring_loaded)) + $mbstring_loaded = extension_loaded('mbstring'); + // convert charset using mbstring module if ($mbstring_loaded) { -- cgit v1.2.3