From b19536f2f3f1753aa17fd87993258bb0e82b47b6 Mon Sep 17 00:00:00 2001 From: thomascube Date: Fri, 21 Mar 2008 12:59:03 +0000 Subject: [PATCH] Added charset alias for mb_convert (fixes #1484598) --- program/include/main.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/program/include/main.inc b/program/include/main.inc index 3bbc5f21e..3a1d64734 100644 --- a/program/include/main.inc +++ b/program/include/main.inc @@ -971,10 +971,11 @@ function rcube_charset_convert($str, $from, $to=NULL) // convert charset using mbstring module if ($MBSTRING) { - $mb_map = $aliases + array('UTF-7' => 'UTF7-IMAP'); + $aliases['UTF-7'] = 'UTF7-IMAP'; + $aliases['WINDOWS-1257'] = 'ISO-8859-13'; // return if convert succeeded - if (($out = mb_convert_encoding($str, ($mb_map[$to] ? $mb_map[$to] : $to), ($mb_map[$from] ? $mb_map[$from] : $from))) != '') + if (($out = mb_convert_encoding($str, ($aliases[$to] ? $aliases[$to] : $to), ($aliases[$from] ? $aliases[$from] : $from))) != '') return $out; }