I updated to the latest 'next' branch of sup
this morning, and immediately ran into a crash
when viewing a message with an attachement, which
was probably sent by an Outlook user.  The crash
was due to a nil charset; this patch fixes the crash.
---
 lib/sup/message-chunks.rb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/sup/message-chunks.rb b/lib/sup/message-chunks.rb
index 3f57346..41d924b 100644
--- a/lib/sup/message-chunks.rb
+++ b/lib/sup/message-chunks.rb
@@ -98,7 +98,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 },
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk

Reply via email to