note 58841 added to function.quoted-printable-decode

From: Date: Thu, 17 Nov 2005 13:33:39 +0000
Subject: note 58841 added to function.quoted-printable-decode
Groups: php.notes 
Request: Send a blank email to php-notes+get-98707@lists.php.net to get a copy of this message
To bendi at interia dot pl: I found that the function seems to work better with a change to the regex: <?preg_match_all( '/.{1,74}([^=]{0,2})?/', $sString, $aMatch );?> Note the change from {1,73} and {0,3}. Before, if the function encountered a hexcode (e.g. =3D) at the end of a 76-character chunk, it would chop it off and prepend it to the next chunk. Fair enough if it goes off the end of the chunk; qp-encoded lines should never exceed 76 characters and hexcodes should never be split across lines. But it wasn't allowing them to just be at the end either. Strangley, the symptom I found was that dots would be missing here and there (e.g. in web addresses), so if this is happening to you, try this fix. ---- Manual Page -- http://www.php.net/manual/en/function.quoted-printable-decode.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+58841 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+58841&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+58841&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+58841&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+58841&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+58841&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+58841&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+58841&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+58841&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#98707) next »