Oleg Broytmann's support for RFC 2231 encoded parameters, SF patch #549133

New test cases.
diff --git a/Lib/test/test_email.py b/Lib/test/test_email.py
index b617bc0..efca478 100644
--- a/Lib/test/test_email.py
+++ b/Lib/test/test_email.py
@@ -158,7 +158,7 @@
         msg.set_boundary('BOUNDARY')
         header, value = msg.items()[4]
         eq(header.lower(), 'content-type')
-        eq(value, 'text/plain; charset=us-ascii; boundary="BOUNDARY"')
+        eq(value, 'text/plain; charset="us-ascii"; boundary="BOUNDARY"')
         # This one has a Content-Type: header, with a boundary, stuck in the
         # middle of its headers.  Make sure the order is preserved; it should
         # be fifth.
@@ -1787,6 +1787,17 @@
         eq(h.encode(), hstr)
 
 
+# Test RFC 2231 header parameters decoding
+class TestRFC2231(TestEmailBase):
+    def test_get_param(self):
+        eq = self.assertEqual
+        msg = self._msgobj('msg_29.txt')
+        eq(msg.get_param('title'),
+           ('us-ascii', 'en', 'This is even more ***fun*** isn\'t it!'))
+        eq(msg.get_param('title', unquote=0),
+           ('us-ascii', 'en', '"This is even more ***fun*** isn\'t it!"'))
+
+
 
 def _testclasses():
     mod = sys.modules[__name__]