summaryrefslogtreecommitdiff
path: root/rt/t/mail/wrong_mime_charset.t
diff options
context:
space:
mode:
authorivan <ivan>2012-01-21 03:46:24 +0000
committerivan <ivan>2012-01-21 03:46:24 +0000
commitfb4ab1073f0d15d660c6cdc4e07afebf68ef3924 (patch)
treee27a6336cc67eb403c9276a6a1967b904ecfdbbe /rt/t/mail/wrong_mime_charset.t
parenta7de168188ff30192238c20a194c144e2bfd1716 (diff)
parent24548f7cf666bac02335d0bc74f81251c7b4ab50 (diff)
This commit was generated by cvs2svn to compensate for changes in r12472,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'rt/t/mail/wrong_mime_charset.t')
-rw-r--r--rt/t/mail/wrong_mime_charset.t10
1 files changed, 8 insertions, 2 deletions
diff --git a/rt/t/mail/wrong_mime_charset.t b/rt/t/mail/wrong_mime_charset.t
index f53c872e5..71a574f26 100644
--- a/rt/t/mail/wrong_mime_charset.t
+++ b/rt/t/mail/wrong_mime_charset.t
@@ -9,17 +9,23 @@ 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
$mime->head->mime_attr( "Content-Type.charset" => 'utf8' );
RT::I18N::SetMIMEEntityToEncoding( $mime, 'iso-8859-1' );
+
+TODO: {
+ local $TODO =
+'need a better approach of encoding converter, should be fixed in 4.2';
+
my $subject = decode( 'iso-8859-1', $mime->head->get('Subject') );
chomp $subject;
is( $subject, $test_string, 'subject is set to iso-8859-1' );
my $body = decode( 'iso-8859-1', $mime->stringify_body );
chomp $body;
is( $body, $test_string, 'body is set to iso-8859-1' );
+}