note 10350 added to imap_mime_header_decode
| From: | bandpay at hotmail dot com | Date: | Fri, 29 Dec 2000 14:41:23 +0000 |
| Subject: | note 10350 added to imap_mime_header_decode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-9212@lists.php.net to get a copy of this message | ||
I wrote a simple compliment to this function:
function encode_iso88591($string){
$text = '=?iso-8859-1?q?';
for( $i = 0 ; $i < strlen($string) ; $i++ ){
$val = ord($string[$i]);
$val = dechex($val);
$text .= '='.$val;
}
$text .= '?=';
return $text;
}
And it works. Of course it would be much better if only the none standard characters were encoded.
But this one doesn't need updates. And any character is encoded.
http://www.php.net/manual/function.imap-mime-header-decode.php