note 28187 added to function.quoted-printable-decode
| From: | pinkpanther at swissonline dot ch | Date: | Sun, 05 Jan 2003 09:31:46 +0000 |
| Subject: | note 28187 added to function.quoted-printable-decode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-41683@lists.php.net to get a copy of this message | ||
Sorry, above I mixed up QP-Decode and UrlDecode, the example I gave above is in fact UrlDecode:
function UrlDecode($string) {
return preg_replace("/%([0-9A-Fa-f]{2})/e", "chr(hexdec('\\1'))",
$string);
}
f.e. replaces '%3F' with '?'
Quoted-printable would be:
function qp_decode($string) {
return preg_replace("/=([0-9A-F]{2})/e", "chr(hexdec('\\1'))",
$string);
}
f.e. replaces '=20' with ' '
--
http://www.php.net/manual/en/function.quoted-printable-decode.php
http://master.php.net/manage/user-notes.php?action=edit+28187
http://master.php.net/manage/user-notes.php?action=delete+28187
http://master.php.net/manage/user-notes.php?action=reject+28187