diff options
author | thomascube <thomas@roundcube.net> | 2008-03-21 12:59:03 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2008-03-21 12:59:03 +0000 |
commit | b19536f2f3f1753aa17fd87993258bb0e82b47b6 (patch) | |
tree | 195add4ac67c5c2048f4b11dce55ccc13cf324b1 /program/include/main.inc | |
parent | 7250d6363cdce1ffd9ad8a41605fee6912719dcd (diff) |
Added charset alias for mb_convert (fixes #1484598)
Diffstat (limited to 'program/include/main.inc')
-rw-r--r-- | program/include/main.inc | 5 |
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; } |