note 49987 added to function.imap-utf8
| From: | marcelo at maccoy dot com dot br | Date: | Mon, 14 Feb 2005 20:01:57 +0000 |
| Subject: | note 49987 added to function.imap-utf8 | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-85027@lists.php.net to get a copy of this message | ||
# this script are correct with the right signs remove expression
# please, ignore the later.
function decode_utf8($str){
# paterns
$err="(=\?.{10,13}q\?_?|\?\=)";
$pat = "/=([0-9A-F]{2})/";
$cha="'.chr(hexdec(";
# erase null signs in string
$str=eregi_replace($err,"",$str);
# to decode with eval and replace
eval("\$str='".
preg_replace($pat,$cha."'$1')).'",$str)
."';");
# return
return $str;
}
#Note: you can to reduce this script in 3 lines.
----
Manual Page -- http://www.php.net/manual/en/function.imap-utf8.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+49987
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49987&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49987&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49987&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49987&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49987&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+49987&report=yes
Search -- http://master.php.net/manage/user-notes.php