public
Last active

  • Download Gist
diff test_quote
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
diff --git a/test/test_quote.rb b/test/test_quote.rb
index 4dabc13..7411656 100644
--- a/test/test_quote.rb
+++ b/test/test_quote.rb
@@ -81,6 +81,13 @@ class TestQuote < Test::Unit::TestCase
assert_equal expected, mail.subject
end
+ def test_email_with_wrong_splitted_multibyte_encoded_word_subject
+ mail = TMail::Mail.parse(IO.read("#{File.dirname(__FILE__)}/fixtures/raw_email_with_wrong_splitted_multibyte_encoded_word_subject"))
+ expected = "Stefan_Haubold_hat_dich_als_FreundIn_auf_Facebook_hinzugef\304gt ..."
+ expected.force_encoding 'utf-8' if expected.respond_to? :force_encoding
+ assert_equal expected, mail.subject
+ end
+
def test_decode
encoded, decoded = expected_base64_strings
assert_equal decoded, TMail::Base64.decode(encoded)
raw_email_with_wrong_splitted_multibyte_encoded_word_subject
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Return-path: <stefan.haubold@hait.de>
Envelope-to: stefan.haubold@hait.de
Delivery-date: Mon, 09 Mar 2009 13:18:38 +0100
Message-Id: <38E3A771-4984-45AB-9891-AB89346B69A2@hait.de>
From: Stefan Haubold <stefan.haubold@hait.de>
To: Stefan Haubold <stefan.haubold@hait.de>
Content-Type: text/plain; charset=US-ASCII; format=flowed
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (Apple Message framework v930.3)
Subject: =?UTF-8?Q?Stefan_Haubold_hat_dich_als_FreundIn_auf_Facebook_hinzugef=C3?=
=?UTF-8?Q?=BCgt_...?=
Date: Mon, 9 Mar 2009 13:18:26 +0100
X-Mailer: Apple Mail (2.930.3)
 
test

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.