[Svn] r2321 - in trunk/roundcubemail: . program/include

trac at roundcube.net trac at roundcube.net
Sun Mar 1 09:14:14 CET 2009


Author: alec
Date: 2009-03-01 02:14:14 -0600 (Sun, 01 Mar 2009)
New Revision: 2321

Modified:
   trunk/roundcubemail/CHANGELOG
   trunk/roundcubemail/program/include/main.inc
Log:
- Support 'UNICODE-1-1-UTF-7' alias for UTF-7 encoding (#1485758)


Modified: trunk/roundcubemail/CHANGELOG
===================================================================
--- trunk/roundcubemail/CHANGELOG	2009-03-01 07:55:39 UTC (rev 2320)
+++ trunk/roundcubemail/CHANGELOG	2009-03-01 08:14:14 UTC (rev 2321)
@@ -4,6 +4,7 @@
 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)
 ----------

Modified: trunk/roundcubemail/program/include/main.inc
===================================================================
--- trunk/roundcubemail/program/include/main.inc	2009-03-01 07:55:39 UTC (rev 2320)
+++ trunk/roundcubemail/program/include/main.inc	2009-03-01 08:14:14 UTC (rev 2321)
@@ -186,6 +186,12 @@
   $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 @@
     }
   }
 
-
   if (is_null($mbstring_loaded))
     $mbstring_loaded = extension_loaded('mbstring');
     
@@ -232,8 +237,8 @@
         return $out;
     }
   }
-    
-  
+
+  # try to convert with custom classes
   if (class_exists('utf8'))
     $conv = new utf8();
 

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list