From mboxrd@z Thu Jan 1 00:00:00 1970 From: ismo@iki.fi (Ismo Puustinen) Date: Tue, 4 Dec 2007 11:48:19 +0200 Subject: [sup-talk] Sup crash report, part 2 Message-ID: <20071204094819.GA2739@arlanda> Hi again, I found after some experimenting that the following patch appears to fix the problem (not sure about the results, but at least sup no longer crashes): Index: lib/sup/rfc2047.rb =================================================================== --- lib/sup/rfc2047.rb (revision 737) +++ lib/sup/rfc2047.rb (working copy) @@ -55,7 +55,16 @@ # Convert: # # Remember - Iconv.open(to, from)! - text = Iconv.iconv(target, charset, text).join + # + # Note that because of the iconv bug descrcibed in + # http://po-ru.com/diary/fixing-invalid-utf-8-in-ruby-revisited/ + # we need to still use the rescue block (or work around the issue + # in another way). + begin + text = Iconv.iconv(target + "//IGNORE", charset, text).join + rescue Iconv::InvalidCharacter + text + end end end end The next problem will be getting utf-8 support for the curses interface, since the messages don't currently display correctly... -- Ismo Puustinen