Bug #13555 [Opn->Fbk]: Header-Decode: Removing white-space incomplete
| From: | alan at akbkhome dot com | Date: | Thu, 02 Sep 2010 13:54:19 +0000 |
| Subject: | Bug #13555 [Opn->Fbk]: Header-Decode: Removing white-space incomplete | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-4752@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=13555&edit=1
ID: 13555
Updated by: alan@akbkhome.com
Reported By: wolfgang dot brodowski at innovations dot de
Summary: Header-Decode: Removing white-space incomplete
-Status: Open
+Status: Feedback
Type: Bug
Package: Mail_mimeDecode
Operating System: Windows
PHP Version: 5.2.2
Roadmap Versions:
New Comment:
-Status: Open
+Status: Feedback
possibly fix in svn - we merge multiline encoded and remove spaces
there.
- not sure if it's an issue with continual encoding.
Previous Comments:
------------------------------------------------------------------------
[2008-12-27 14:11:32] avb
Moving to proper package.
------------------------------------------------------------------------
[2008-04-01 09:14:49] brody
Description:
------------
Line below comment "// Remove white space between encoded-words " of
file "mimeDecode.php" does only work correctly, if the encoded line does
only contains ONE space (and thus TWO encoded words); e.g. subjects (as
in my case, which are splitted into more words because of its original
length) a decoded wrongly having additional spaces. This behaviouer
leaded in my case to a later search with this subject to get no result.
I guess, that either the regex must be changed to remove all spaces (I'm
not fit enough in regex to do so) or to implement a loop for removing
them.
Test script:
---------------
<?php
require_once( 'Mail/mimeDecode.php' );
$encodedsubject =
"=?utf-8?B?W0pJUkFdIEtvbW1lbnRpZXJ0OiAoSUNULTQ1MTEpIFI=?=
=?utf-8?B?ZXN1bHRTZXQgaXMgY2xvc2VkIGFtIEVuZGUgZGVyIFI=?=
=?utf-8?B?ZWdlbGF1c2bDvGhydW5nIG1pdCBEQkMgKCMgMjIxKQ==?=";
echo "decoding " . $encodedsubject;
$decoder = new Mail_mimeDecode("nothing");
$decodedsubject = $decoder->_decodeHeader($encodedsubject);
echo "\nResult:" . $decodedsubject;
echo "\n\nline contains an errornous space between 'R' and 'egelaus...'
(the continuation of the word)";
?>
Expected result:
----------------
its showing an additional space, where its wrong.
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=13555&edit=1