From: nicolas.pouillard@gmail.com (Nicolas Pouillard)
Subject: [sup-talk] [PATCH] encoding, fix: Normalize UTF8 and UTF_8 to utf8, to please iconv.
Date: Tue, 8 Jan 2008 02:42:56 +0100 [thread overview]
Message-ID: <11997565763275-git-send-email-nicolas.pouillard@gmail.com> (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
next reply other threads:[~2008-01-08 1:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-08 1:42 Nicolas Pouillard [this message]
2008-01-08 6:36 ` 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=11997565763275-git-send-email-nicolas.pouillard@gmail.com \
--to=nicolas.pouillard@gmail.com \
/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