note 41834 added to function.bin2hex

From: Date: Fri, 23 Apr 2004 11:14:35 +0000
Subject: note 41834 added to function.bin2hex
Groups: php.notes 
Request: Send a blank email to php-notes+get-68633@lists.php.net to get a copy of this message
My version of quoted-printable mail subject converting function (maybe not as effective, but preserving characters which don't need conversion). Martin <?php // Transfer mail subject into Quoted Printable encoding function mail_quote_subj($str, $charset){ $out = ''; for($i = 0; $i < strlen($str); $i++){ $out .= (ord($str[$i]) > 127) ? "=" . bin2hex($str[$i]) : $str[$i]; } return "=?$charset?Q?".$out."?="; }; ?> ---- Manual Page -- http://www.php.net/manual/en/function.bin2hex.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+41834 Delete -- http://master.php.net/manage/user-notes.php?action=delete+41834&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+41834&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#68633) next »