note 56230 added to function.imap-qprint
| From: | bletous at yahoo dot fr | Date: | Sun, 28 Aug 2005 00:55:57 +0000 |
| Subject: | note 56230 added to function.imap-qprint | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-94282@lists.php.net to get a copy of this message | ||
Some mails are encoded in bad quoted printable format:
I use this function to decode the qprint:
for($i=0;$i<256;$i++)
{
$c1=dechex($i);
if(strlen($c1)==1){$c1="0".$c1;}
$c1="=".$c1;
$myqprinta[]=$c1;
$myqprintb[]=chr($i);
}
function decode($data,$code)
{
if(!$code){return imap_utf7_decode($data);}
if($code==0){return imap_utf7_decode($data);}
if($code==1){return imap_utf8($data);}
if($code==2){return ($data);}
if($code==3){return imap_base64($data);}
if($code==4){return imap_qprint(str_replace($myqprinta,$myqprintb,($data)));}
if($code==5){return ($data);}
}
----
Manual Page -- http://www.php.net/manual/en/function.imap-qprint.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+56230
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56230&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56230&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56230&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56230&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56230&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56230&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+56230&report=yes
Search -- http://master.php.net/manage/user-notes.php