> > It's seems to work, and seems to not break others decodings, what do you
> > think about it ?
>
> $string='test =?utf-8?Q?encoded=C4=85-word and space?=';
>
> $string='test =?utf-8?q?encoded=C4=85-word and space?=';
>
> $string='test =?utf-8?Q?encoded=C4=85-word and space?= test';
>
> You assumed that entire string is encoded and used case sensitive match.
>
> Same header can contain several encoded words. These words can use
> different charsets (special thanks to Evolution :)). Some encoded words
> can use B encoding and others use Q encoding.
>
> str_replace should be changed into some preg_replace that changes only
> spaces present inside of Q encoded part of header.
>
> Maybe you should try splitting string into array and detect values that
> start with "=?charset?[qQ]?" and does not end with "?=" or replace spaces
> only between those two keys.
>
You're right : so this new patch does that...

--- /opt/www/squirrelmail/functions/mime.php    2004-11-23
15:31:54.000000000 +0100
+++ /opt/www/squirrelmail/functions/mime.php.new        2004-12-05
20:04:27.000000000 +0100
@@ -579,6 +579,7 @@
     $iLastMatch = -2;
     $encoded = false;

+    $string= preg_replace( '/(=\?[^?]*\?Q\?)(.*)(\?=)/Uie' ,
"'\\1'.str_replace(' ','_','\\2').'\\3'" , $string );
     $aString = explode(' ',$string);
     $ret = '';
     foreach ($aString as $chunk) {

>
> I suspect that you get lots of emails from Lotus Domino/Notes servers. :)
> Or people use some other mailing list software. Can you name it?
Sorry, can't find the name of theses weird mailing list software...

> If broken program is not fixed and other program/function is used to avoid
> the problems with broken program, broken program will remain unfixed.
>
> Internet protocols are written in order to allow interaction between
> different systems. If something is breaking the standard, people must fix
> that something.
>

I really agree but :
1) can't fix it by my self with unknow and/or closed source softwares :-(
2) users and clients dont wan't to ear about it...


Thanks for your help...

    Laurent



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
--
squirrelmail-users mailing list
Posting Guidelines: 
http://squirrelmail.org/wiki/wiki.php?MailingListPostingGuidelines
List Address: [EMAIL PROTECTED]
List Archives: 
http://news.gmane.org/thread.php?group=gmane.mail.squirrelmail.user
List Archives:  http://sourceforge.net/mailarchive/forum.php?forum_id=2995
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users

Reply via email to