From: Mark Alexander Date: Tue, 2 Jun 2009 16:29:13 +0000 (-0700) Subject: handle nil charset on attachments X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=701e2d14473e4090a57c5d22ef6df89f9bce5b51;p=sup handle nil charset on attachments --- diff --git a/lib/sup/message-chunks.rb b/lib/sup/message-chunks.rb index 865dbf8..e817744 100644 --- a/lib/sup/message-chunks.rb +++ b/lib/sup/message-chunks.rb @@ -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 },