]> git.notmuchmail.org Git - sup/commitdiff
encoding, fix: Normalize UTF8 and UTF_8 to utf8, to please iconv.
authorNicolas Pouillard <nicolas.pouillard@gmail.com>
Tue, 8 Jan 2008 01:42:56 +0000 (02:42 +0100)
committerWilliam Morgan <wmorgan-sup@masanjin.net>
Tue, 8 Jan 2008 06:01:53 +0000 (22:01 -0800)
Signed-off-by: William Morgan <wmorgan-sup@masanjin.net>
lib/sup/message.rb
lib/sup/rfc2047.rb

index 01008ede4a9c6582535db3d69fd33e262fa5517a..53ab2a670752c14bbfaa703b72464db576ff164d 100644 (file)
@@ -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
index 10ad7e065352ced65a6c19399db635cea9934be2..947de022bc41715c641585e7fe73b4405aac7b6e 100644 (file)
@@ -52,6 +52,8 @@ module Rfc2047
         # WORD.
       end
 
+      charset = "utf-8" if charset =~ /UTF_?8/i
+
       # Convert:
       #
       # Remember - Iconv.open(to, from)!