From: Nicolas Pouillard Date: Tue, 8 Jan 2008 01:42:56 +0000 (+0100) Subject: encoding, fix: Normalize UTF8 and UTF_8 to utf8, to please iconv. X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=4701831a64d57d5a266578d4b9697efd180415dc;p=sup encoding, fix: Normalize UTF8 and UTF_8 to utf8, to please iconv. Signed-off-by: William Morgan --- diff --git a/lib/sup/message.rb b/lib/sup/message.rb index 01008ed..53ab2a6 100644 --- a/lib/sup/message.rb +++ b/lib/sup/message.rb @@ -391,6 +391,7 @@ private end def self.convert_from body, charset + charset = "utf-8" if charset =~ /UTF_?8/i begin raise MessageFormatError, "RubyMail decode returned a null body" unless body return body unless charset diff --git a/lib/sup/rfc2047.rb b/lib/sup/rfc2047.rb index 10ad7e0..947de02 100644 --- a/lib/sup/rfc2047.rb +++ b/lib/sup/rfc2047.rb @@ -52,6 +52,8 @@ module Rfc2047 # WORD. end + charset = "utf-8" if charset =~ /UTF_?8/i + # Convert: # # Remember - Iconv.open(to, from)!