* [sup-talk] [PATCH] encoding, fix: Normalize UTF8 and UTF_8 to utf8, to please iconv.
@ 2008-01-08 1:42 Nicolas Pouillard
2008-01-08 6:36 ` William Morgan
0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Pouillard @ 2008-01-08 1:42 UTC (permalink / raw)
---
lib/sup/message.rb | 1 +
lib/sup/rfc2047.rb | 2 ++
2 files changed, 3 insertions(+), 0 deletions(-)
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)!
--
1.5.3.1.109.gacd69
^ permalink raw reply [flat|nested] 2+ messages in thread
* [sup-talk] [PATCH] encoding, fix: Normalize UTF8 and UTF_8 to utf8, to please iconv.
2008-01-08 1:42 [sup-talk] [PATCH] encoding, fix: Normalize UTF8 and UTF_8 to utf8, to please iconv Nicolas Pouillard
@ 2008-01-08 6:36 ` William Morgan
0 siblings, 0 replies; 2+ messages in thread
From: William Morgan @ 2008-01-08 6:36 UTC (permalink / raw)
Applied, thanks.
--
William <wmorgan-sup at masanjin.net>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-01-08 6:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-08 1:42 [sup-talk] [PATCH] encoding, fix: Normalize UTF8 and UTF_8 to utf8, to please iconv Nicolas Pouillard
2008-01-08 6:36 ` William Morgan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox