Subject: | Use of re_especials causes not-encoding of part of header and mangling it under Exchange |
When header contains a value like
"Re: [Bug 12345] Some text"
The first part "Re: [Bug 12345]" is not encoded at all. When using
Microsoft Exchange, you'll see that it decodes this "partially-encoded"
header and mangles it adding spaces in different places when re-
encoding.
$re_especials = $re_encoded_word helps, a patch is included.
What is the idea of the $especials? Is it needed at all?
Subject: | Header.pm.diff |
--- Encode/MIME/Header.pm 2009-09-04 21:23:09.449183874 +0400
+++ Encode/MIME/Header.pm 2009-09-16 15:19:37.112973399 +0400
@@ -106,7 +106,7 @@ my $re_encoded_word = qr{
\?= # end encoded word
}xo;
-my $re_especials = qr{$re_encoded_word|$especials}xo;
+my $re_especials = $re_encoded_word;
sub encode($$;$) {
my ( $obj, $str, $chk ) = @_;