note 85993 added to function.quoted-printable-decode
| From: | zg at osu1 dot php dot net | Date: | Sat, 27 Sep 2008 13:48:09 +0000 |
| Subject: | note 85993 added to function.quoted-printable-decode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-144836@lists.php.net to get a copy of this message | ||
<?php
function quoted_printable_encode( $str, $chunkLen = 72 )
{
$offset = 0;
$str = strtr(rawurlencode($str), array('%' => '='));
$len = strlen($str);
$enc = '';
while ( $offset < $len )
{
if ( $str{ $offset + $chunkLen - 1 } === '=' )
{
$line = substr($str, $offset, $chunkLen - 1);
$offset += $chunkLen - 1;
}
elseif ( $str{ $offset + $chunkLen - 2 } === '=' )
{
$line = substr($str, $offset, $chunkLen - 2);
$offset += $chunkLen - 2;
}
else
{
$line = substr($str, $offset, $chunkLen);
$offset += $chunkLen;
}
if ( $offset + $chunkLen < $len )
$enc .= $line ."=\n";
else
$enc .= $line;
}
return $enc;
}
?>
----
Server IP: 91.189.86.54
Probable Submitter: 77.223.81.49
----
Manual Page -- http://www.php.net/manual/en/function.quoted-printable-decode.php
Edit -- https://master.php.net/note/edit/85993
Del: integrated -- https://master.php.net/note/delete/85993/integrated
Del: useless -- https://master.php.net/note/delete/85993/useless
Del: bad code -- https://master.php.net/note/delete/85993/bad+code
Del: spam -- https://master.php.net/note/delete/85993/spam
Del: non-english -- https://master.php.net/note/delete/85993/non-english
Del: in docs -- https://master.php.net/note/delete/85993/in+docs
Del: other reasons-- https://master.php.net/note/delete/85993
Reject -- https://master.php.net/note/reject/85993
Search -- https://master.php.net/manage/user-notes.php