diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-03-01 08:14:14 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-03-01 08:14:14 +0000 |
| commit | 9cc05ace81e35ea9ea4ead8b8d4917f4e38350c6 (patch) | |
| tree | 972964ee4c4530d7efa6b2c022eab344ea4f25c8 | |
| parent | d2520bb31999b60cbf7e0c90ce59e6ca25af68b7 (diff) | |
- Support 'UNICODE-1-1-UTF-7' alias for UTF-7 encoding (#1485758)
git-svn-id: https://svn.roundcube.net/trunk@2321 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/CHANGELOG | 1 | ||||
| -rw-r--r-- | roundcubemail/program/include/main.inc | 11 |
2 files changed, 9 insertions, 3 deletions
diff --git a/roundcubemail/CHANGELOG b/roundcubemail/CHANGELOG index 9a6b572b1..e1d64eb69 100644 --- a/roundcubemail/CHANGELOG +++ b/roundcubemail/CHANGELOG @@ -4,6 +4,7 @@ CHANGELOG RoundCube Webmail 2009/03/01 (alec) ---------- - Fix attaching more than nine inline images (#1485759) +- Support 'UNICODE-1-1-UTF-7' alias for UTF-7 encoding (#1485758) 2009/02/27 (thomasb) ---------- diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc index 86fe578ca..9adcd4cfc 100644 --- a/roundcubemail/program/include/main.inc +++ b/roundcubemail/program/include/main.inc @@ -186,6 +186,12 @@ function rcube_charset_convert($str, $from, $to=NULL) $to = $to==NULL ? strtoupper(RCMAIL_CHARSET) : strtoupper($to); $error = false; $conv = null; + # RFC1642 + if ($from == 'UNICODE-1-1-UTF-7') + $from = 'UTF-7'; + if ($to == 'UNICODE-1-1-UTF-7') + $to = 'UTF-7'; + if ($from==$to || $str=='' || empty($from)) return $str; @@ -209,7 +215,6 @@ function rcube_charset_convert($str, $from, $to=NULL) } } - if (is_null($mbstring_loaded)) $mbstring_loaded = extension_loaded('mbstring'); @@ -232,8 +237,8 @@ function rcube_charset_convert($str, $from, $to=NULL) return $out; } } - - + + # try to convert with custom classes if (class_exists('utf8')) $conv = new utf8(); |
