diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-11-21 05:37:22 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-11-21 05:37:22 +0000 |
commit | 6740f441c4993259c69aa60a7d44ec8275941870 (patch) | |
tree | 116be10431723be5a1c0278d22693945f7020d9d /test/fixtures | |
parent | adcf54a92b13449709c2cdbe7914fed44ef68fc9 (diff) | |
download | redmine-6740f441c4993259c69aa60a7d44ec8275941870.tar.gz redmine-6740f441c4993259c69aa60a7d44ec8275941870.zip |
fix non ASCII attachment filename encoding broken (MOJIBAKE) in receiving mail on Ruby 1.8 (#12399)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10852 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/fixtures')
4 files changed, 106 insertions, 0 deletions
diff --git a/test/fixtures/mail_handler/gmail_with_attachment_iso-8859-1.eml b/test/fixtures/mail_handler/gmail_with_attachment_iso-8859-1.eml new file mode 100644 index 000000000..4f1f6f347 --- /dev/null +++ b/test/fixtures/mail_handler/gmail_with_attachment_iso-8859-1.eml @@ -0,0 +1,26 @@ +Date: Tue, 20 Nov 2012 23:08:25 +0900
+Message-ID: <CANBr5-UZM=Odz4U3Q6vHd_9cd2tCT-_P9xDd=hRJ0aoMNTWXbw@mail.gmail.com>
+Subject: test
+From: John Smith <JSmith@somenet.foo>
+To: redmine@somenet.foo
+Content-Type: multipart/mixed; boundary=14dae93a13bf76ca5d04ceedc458
+
+--14dae93a13bf76ca5d04ceedc458
+Content-Type: text/plain; charset=ISO-8859-1
+
+test
+
+--14dae93a13bf76ca5d04ceedc458
+Content-Type: text/plain; charset=US-ASCII;
+ name="=?ISO-8859-1?B?xOTW9tz8xOTW9tz8xOTW9tz8xOTW9tz8xOTW9tw=?=
+ =?ISO-8859-1?B?/MTk1vbc/MTk1vbc/MTk1vbc/MTk1vbc/MTk1vbc?=
+ =?ISO-8859-1?B?/MTk1vbc/C50eHQ=?="
+Content-Disposition: attachment;
+ filename="=?ISO-8859-1?B?xOTW9tz8xOTW9tz8xOTW9tz8xOTW9tz8xOTW9tw=?=
+ =?ISO-8859-1?B?/MTk1vbc/MTk1vbc/MTk1vbc/MTk1vbc/MTk1vbc?=
+ =?ISO-8859-1?B?/MTk1vbc/C50eHQ=?="
+Content-Transfer-Encoding: base64
+X-Attachment-Id: f_h9r3mcjz0
+
+dGVzdAo=
+--14dae93a13bf76ca5d04ceedc458--
diff --git a/test/fixtures/mail_handler/gmail_with_attachment_ja.eml b/test/fixtures/mail_handler/gmail_with_attachment_ja.eml new file mode 100644 index 000000000..8d4e4f334 --- /dev/null +++ b/test/fixtures/mail_handler/gmail_with_attachment_ja.eml @@ -0,0 +1,20 @@ +Date: Mon, 19 Nov 2012 10:17:45 +0900
+Message-ID: <CANBr5-U6cXMfLek5QiB2ZrBPR3vTThn9_Upvdkf3Dkod664+Xw@mail.gmail.com>
+Subject: test
+From: John Smith <JSmith@somenet.foo>
+To: redmine@somenet.foo
+Content-Type: multipart/mixed; boundary=bcaec54ee4ea84f77904cecee22e
+
+--bcaec54ee4ea84f77904cecee22e
+Content-Type: text/plain; charset=ISO-8859-1
+
+test
+
+--bcaec54ee4ea84f77904cecee22e
+Content-Type: text/plain; charset=US-ASCII; name="=?ISO-2022-JP?B?GyRCJUYlOSVIGyhCLnR4dA==?="
+Content-Disposition: attachment; filename="=?ISO-2022-JP?B?GyRCJUYlOSVIGyhCLnR4dA==?="
+Content-Transfer-Encoding: base64
+X-Attachment-Id: f_h9owndpv0
+
+dGVzdAo=
+--bcaec54ee4ea84f77904cecee22e--
diff --git a/test/fixtures/mail_handler/thunderbird_with_attachment_iso-8859-1.eml b/test/fixtures/mail_handler/thunderbird_with_attachment_iso-8859-1.eml new file mode 100644 index 000000000..89ad4a904 --- /dev/null +++ b/test/fixtures/mail_handler/thunderbird_with_attachment_iso-8859-1.eml @@ -0,0 +1,34 @@ +Message-ID: <50AB9546.7020800@gmail.com>
+Date: Tue, 20 Nov 2012 23:35:50 +0900
+From: John Smith <JSmith@somenet.foo>
+User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc13 Thunderbird/3.1.10
+MIME-Version: 1.0
+To: redmine@somenet.foo
+Subject: test
+Content-Type: multipart/mixed;
+ boundary="------------050902080306030406090208"
+
+This is a multi-part message in MIME format.
+--------------050902080306030406090208
+Content-Type: text/plain; charset=ISO-8859-1; format=flowed
+Content-Transfer-Encoding: 7bit
+
+test
+
+--------------050902080306030406090208
+Content-Type: image/png;
+ name="=?ISO-8859-1?Q?=C4=E4=D6=F6=DC=FC=C4=E4=D6=F6=DC=FC=C4=E4=D6=F6=DC=FC=C4=E4?=
+ =?ISO-8859-1?Q?=D6=F6=DC=FC=C4=E4=D6=F6=DC=FC=C4=E4=D6=F6=DC=FC=C4=E4=D6?=
+ =?ISO-8859-1?Q?=F6=DC=FC=C4=E4=D6=F6=DC=FC=C4=E4=D6=F6=DC=FC=C4=E4=D6=F6?=
+ =?ISO-8859-1?Q?=DC=FC=C4=E4=D6=F6=DC=FC=2Epng?="
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment;
+ filename*0*=ISO-8859-1''%C4%E4%D6%F6%DC%FC%C4%E4%D6%F6%DC%FC%C4%E4%D6%F6;
+ filename*1*=%DC%FC%C4%E4%D6%F6%DC%FC%C4%E4%D6%F6%DC%FC%C4%E4%D6%F6%DC%FC;
+ filename*2*=%C4%E4%D6%F6%DC%FC%C4%E4%D6%F6%DC%FC%C4%E4%D6%F6%DC%FC%C4%E4;
+ filename*3*=%D6%F6%DC%FC%C4%E4%D6%F6%DC%FC%2E%70%6E%67
+
+iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAAAXNSR0IArs4c6QAAAAlwSFlz
+AAALEwAACxMBAJqcGAAAAAd0SU1FB9wLFA4fJhRKIUQAAAAUSURBVAjXY/z//z8DEmBiQAWk
+8gHq9gMHP8uZWAAAAABJRU5ErkJggg==
+--------------050902080306030406090208--
diff --git a/test/fixtures/mail_handler/thunderbird_with_attachment_ja.eml b/test/fixtures/mail_handler/thunderbird_with_attachment_ja.eml new file mode 100644 index 000000000..af7cbdf4c --- /dev/null +++ b/test/fixtures/mail_handler/thunderbird_with_attachment_ja.eml @@ -0,0 +1,26 @@ +Message-ID: <50AA00C6.4070108@gmail.com>
+Date: Mon, 19 Nov 2012 18:49:58 +0900
+From: John Smith <JSmith@somenet.foo>
+User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.15) Gecko/20101027 Fedora/3.0.10-1.fc12 Lightning/1.0b1 Thunderbird/3.0.10
+MIME-Version: 1.0
+To: redmine@somenet.foo
+Subject: test
+Content-Type: multipart/mixed;
+ boundary="------------030104060902010800050907"
+
+This is a multi-part message in MIME format.
+--------------030104060902010800050907
+Content-Type: text/plain; charset=ISO-2022-JP
+Content-Transfer-Encoding: 7bit
+
+test
+
+--------------030104060902010800050907
+Content-Type: text/plain;
+ name="=?ISO-2022-JP?B?GyRCJUYlOSVIGyhCLnR4dA==?="
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment;
+ filename*=ISO-2022-JP''%1B%24%42%25%46%25%39%25%48%1B%28%42%2E%74%78%74
+
+dGVzdAo=
+--------------030104060902010800050907--
|