From: slusarz at curecanti dot org Operating system: Fedora 3 PHP version: 5.0.5 PHP Bug Type: IMAP related Bug description: imap_8bit does not encode ending spaces correctly
Description: ------------ imap_8bit() is broken when it comes to spaces at the end of a line. According to RFC 2045 [6.7(3)]: Octets with values of 9 and 32 MAY be represented as US-ASCII TAB (HT) and SPACE characters, respectively, but MUST NOT be so represented at the end of an encoded line. imap_8bit does nothing to the following line: foo<SPACE> the correct encoding would be as follows: foo=20 Reproduce code: --------------- echo imap_8bit('foo '); Expected result: ---------------- foo=20 Actual result: -------------- foo -- Edit bug report at http://bugs.php.net/?id=35290&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35290&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35290&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35290&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=35290&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35290&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35290&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=35290&r=needscript Try newer version: http://bugs.php.net/fix.php?id=35290&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35290&r=support Expected behavior: http://bugs.php.net/fix.php?id=35290&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35290&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35290&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35290&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35290&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35290&r=dst IIS Stability: http://bugs.php.net/fix.php?id=35290&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35290&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35290&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35290&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=35290&r=mysqlcfg