From 02d0931e252ee41e99b63fc740195f78f1e3bbe0 Mon Sep 17 00:00:00 2001 From: alex-brainstorm Date: Sat, 26 Jul 2003 18:54:44 +0000 Subject: [PATCH] Check for empty default_charset. RCS tag string fixed ;) git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5427 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_utf7_local.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/functions/imap_utf7_local.php b/functions/imap_utf7_local.php index 7f56d606..5478ea6b 100644 --- a/functions/imap_utf7_local.php +++ b/functions/imap_utf7_local.php @@ -8,7 +8,7 @@ * * This implements all functions that do imap UTF7 conversions. * - * $Id $ + * $Id$ */ function sqimap_mb_convert_encoding($str, $to_encoding, $from_encoding, $default_charset) @@ -38,8 +38,8 @@ function imap_utf7_encode_local($s) { return ''; global $default_charset; - set_my_charset(); - if (strtolower($default_charset) != 'iso-8859-1') { + set_my_charset(); //must be called before using $default_charset + if ((strtolower($default_charset) != 'iso-8859-1') && ($default_charset != '')) { $utf7_s = sqimap_mb_convert_encoding($s, 'UTF7-IMAP', $default_charset, $default_charset); if ($utf7_s != '') return $utf7_s; -- 2.25.1