[Rt-commit] rt branch, 3.8/set-mime-encoding-fallback, updated. rt-3.8.10-15-gdbb3139
Alex Vandiver
alexmv at bestpractical.com
Thu Aug 4 19:01:31 EDT 2011
The branch, 3.8/set-mime-encoding-fallback has been updated
via dbb313915c65f1d24e36f4defa02311e30da7a10 (commit)
from ccafbd233e4f50bd8ef1889949e91dc6190f495b (commit)
Summary of changes:
t/mail/wrong_mime_charset.t | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit dbb313915c65f1d24e36f4defa02311e30da7a10
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Aug 4 18:21:58 2011 -0400
Work around a bug in perl < 5.12 where use of => enables the utf8 flag
The fat comma, on perl 5.10.x and below with the "use utf8" pragma
enabled, turns on the internal UTF-8 flag on the string it generates,
regardless of if it contains codepoints > 127. As we erroneously use
the presence of the UTF-8 flag to determine if the string we are given
is already encoded, the this causes different results, despite that the
two strings would test as being 'eq'.
For the purposes of tests, which are the only place which use the "use
utf8" pragma, use double-quotes instead of relying on the fat comma to
quote the keys, which works around this bug.
diff --git a/t/mail/wrong_mime_charset.t b/t/mail/wrong_mime_charset.t
index d496a4b..71a574f 100644
--- a/t/mail/wrong_mime_charset.t
+++ b/t/mail/wrong_mime_charset.t
@@ -9,8 +9,8 @@ use Encode;
my $test_string = 'Ã';
my $encoded_string = encode( 'iso-8859-1', $test_string );
my $mime = MIME::Entity->build(
- Subject => $encoded_string,
- Data => [$encoded_string],
+ "Subject" => $encoded_string,
+ "Data" => [$encoded_string],
);
# set the wrong charset mime in purpose
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list