]> git.cworth.org Git - sup/commitdiff
handle nil charset on attachments
authorMark Alexander <marka@pobox.com>
Tue, 2 Jun 2009 16:29:13 +0000 (09:29 -0700)
committerWilliam Morgan <wmorgan-sup@masanjin.net>
Tue, 2 Jun 2009 16:41:28 +0000 (09:41 -0700)
lib/sup/message-chunks.rb

index 865dbf898d3d29bdddb06bb34b70b0e716ecdd03..e817744f262352d134e483c3d8fcc63ee2e90198 100644 (file)
@@ -99,7 +99,7 @@ EOS
       text =
         case @content_type
         when /^text\/plain\b/
-          Iconv.easy_decode $encoding, encoded_content.charset, @raw_content
+          Iconv.easy_decode $encoding, encoded_content.charset || $encoding, @raw_content
         else
           HookManager.run "mime-decode", :content_type => content_type,
                           :filename => lambda { write_to_disk },