[Rt-commit] rt branch, 4.0/rfc2231-param-continuations, created. rt-4.0.4-113-gc13183e

Thomas Sibley trs at bestpractical.com
Wed Dec 7 16:30:58 EST 2011


The branch, 4.0/rfc2231-param-continuations has been created
        at  c13183e470c1fa40420c36b3839a1318a7a3806b (commit)

- Log -----------------------------------------------------------------
commit c13183e470c1fa40420c36b3839a1318a7a3806b
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Wed Dec 7 16:25:11 2011 -0500

    Test decoding of MIME parameter value continuations
    
    We implement the spec in RFC 2231 for decoding but not param value
    continuations.

diff --git a/t/mail/mime_decoding.t b/t/mail/mime_decoding.t
index b02f979..ca25836 100644
--- a/t/mail/mime_decoding.t
+++ b/t/mail/mime_decoding.t
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 use strict;
 use warnings;
-use RT::Test nodb => 1, tests => 8;
+use RT::Test nodb => 1, tests => 9;
 
 use_ok('RT::I18N');
 
@@ -67,6 +67,24 @@ diag q{rfc2231};
     );
 }
 
+diag q{rfc2231 param continuations};
+{
+    # XXX TODO: test various forms of the continuation stuff
+    #       quotes around the values
+    my $hdr = <<'.';
+Content-Disposition: inline;
+ filename*0*=ISO-2022-JP'ja'%1b$B%3f7$7$$%25F%25%2d%259%25H%1b%28B;
+ filename*1*=%20;
+ filename*2*=%1b$B%25I%25%2d%25e%25a%25s%25H%1b%28B;
+ filename*3=.txt
+.
+    is(
+        RT::I18N::DecodeMIMEWordsToEncoding( $hdr, 'utf-8' ),
+        'Content-Disposition: inline; filename*0="新しいテキスト"; filename*1=" "; filename*2="ドキュメント"; filename*3=".txt"',
+        'decoded, but continuations preserved'
+    );
+}
+
 diag q{canonicalize mime word encodings like gb2312};
 {
     my $str = qq{Subject: =?gb2312?B?1NrKwL3nuPe12Lmy09CzrN9eX1NpbXBsaWZpZWRfQ05fR0IyMzEyYQ==?=

-----------------------------------------------------------------------


More information about the Rt-commit mailing list