sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 1b7320cc20aac405ab13cb097b65d96b06419d2a
parent 924852255e80114d271204a7c3456df49bc6c96d
Author: wmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Date:   Sun,  9 Dec 2007 20:02:17 +0000

iconv/rfc2047 patch from ismo puustinen (slightly modified)

git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@753 5c8cc53c-5e98-4d25-b20a-d8db53a31250

Diffstat:
M lib/sup/rfc2047.rb | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/sup/rfc2047.rb b/lib/sup/rfc2047.rb
@@ -55,7 +55,11 @@ module Rfc2047
       # Convert:
       #
       # Remember - Iconv.open(to, from)!
-      text = Iconv.iconv(target, charset, text).join
+      begin
+        text = Iconv.iconv(target + "//IGNORE", charset, text + " ").join[0 .. -2]
+      rescue Iconv::InvalidCharacter
+        text
+      end
     end
   end
 end