[prev in list] [next in list] [prev in thread] [next in thread] 

List:       squirrelmail-cvs
Subject:    [SM-CVS] CVS: squirrelmail/functions mime.php,1.265.2.8,1.265.2.9
From:       Marc Groot Koerkamp <stekkel () users ! sourceforge ! net>
Date:       2003-06-30 8:15:31
[Download RAW message or body]

Update of /cvsroot/squirrelmail/squirrelmail/functions
In directory sc8-pr-cvs1:/tmp/cvs-serv14964

Modified Files:
      Tag: SM-1_4-STABLE
	mime.php 
Log Message:
Merge from devel. This will stop encoding in the middle of words. Now we
encode te complete word.



Index: mime.php
===================================================================
RCS file: /cvsroot/squirrelmail/squirrelmail/functions/mime.php,v
retrieving revision 1.265.2.8
retrieving revision 1.265.2.9
diff -u -w -r1.265.2.8 -r1.265.2.9
--- mime.php	29 Jun 2003 17:48:18 -0000	1.265.2.8
+++ mime.php	30 Jun 2003 08:15:29 -0000	1.265.2.9
@@ -720,7 +720,13 @@
             $k = ord($string{$i});
             if ($k > 126) {
                 if ($iEncStart === false) {
-                    $iEncStart = $i;
+                    // do not start encoding in the middle of a string, also take the rest of the word.
+                    $sLeadString = substr($string,0,$i);
+                    $aLeadString = explode(' ',$sLeadString);
+                    $sToBeEncoded = array_pop($aLeadString);                  
+                    $iEncStart = $i - strlen($sToBeEncoded);
+                    $ret .= $sToBeEncoded;
+                    $cur_l += strlen($sToBeEncoded);
                 }
                 $cur_l += 3;
                 /* first we add the encoded string that reached it's max size */



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
--
squirrelmail-cvs mailing list
List Address: squirrelmail-cvs@lists.sourceforge.net
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-cvs
http://squirrelmail.org/cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic