sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 8ee91effe23a42d483fa6c0d2106ff328d3ba686
parent 36371414243cb938b6e3821ae2d911f371d3c9c5
Author: William Morgan <wmorgan-sup@masanjin.net>
Date:   Mon, 27 Jul 2009 12:56:35 -0400

Merge branch 'master' into next

Diffstat:
M lib/sup/rfc2047.rb | 6 +-----
M lib/sup/util.rb | 2 +-
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/lib/sup/rfc2047.rb b/lib/sup/rfc2047.rb
@@ -52,11 +52,7 @@ module Rfc2047
         # WORD.
       end
 
-      begin
-        Iconv.easy_decode(target, charset, text)
-      rescue Iconv::InvalidCharacter
-        text
-      end
+      Iconv.easy_decode(target, charset, text)
     end
   end
 end
diff --git a/lib/sup/util.rb b/lib/sup/util.rb
@@ -651,7 +651,7 @@ class Iconv
 
     begin
       Iconv.iconv(target + "//IGNORE", charset, text + " ").join[0 .. -2]
-    rescue Errno::EINVAL, Iconv::InvalidEncoding, Iconv::IllegalSequence => e
+    rescue Errno::EINVAL, Iconv::InvalidEncoding, Iconv::InvalidCharacter, Iconv::IllegalSequence => e
       Redwood::log "warning: error (#{e.class.name}) decoding text from #{charset} to #{target}: #{text[0 ... 20]}"
       text
     end