From: ismo@iki.fi (Ismo Puustinen)
Subject: [sup-talk] Sup crash report, part 2
Date: Tue, 4 Dec 2007 11:48:19 +0200 [thread overview]
Message-ID: <20071204094819.GA2739@arlanda> (raw)
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 <ismo at iki.fi>
next reply other threads:[~2007-12-04 9:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-04 9:48 Ismo Puustinen [this message]
2007-12-09 20:01 ` William Morgan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071204094819.GA2739@arlanda \
--to=ismo@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox