summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2008-03-21 12:59:03 +0000
committerthomascube <thomas@roundcube.net>2008-03-21 12:59:03 +0000
commitb19536f2f3f1753aa17fd87993258bb0e82b47b6 (patch)
tree195add4ac67c5c2048f4b11dce55ccc13cf324b1 /program/include
parent7250d6363cdce1ffd9ad8a41605fee6912719dcd (diff)
Added charset alias for mb_convert (fixes #1484598)
Diffstat (limited to 'program/include')
-rw-r--r--program/include/main.inc5
1 files 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;
}