diff options
author | Tobias Lütke <tobias.luetke@gmail.com> | 2007-10-09 13:34:51 +0000 |
---|---|---|
committer | Tobias Lütke <tobias.luetke@gmail.com> | 2007-10-09 13:34:51 +0000 |
commit | 19c9c7fafbc7c808c080317a1326c4fbc6068bea (patch) | |
tree | 7244a25cc5c1cb33ef2c0986e6f1da26a47acc69 /actionmailer/lib/action_mailer/vendor/tmail/quoting.rb | |
parent | d556f466079d329ee678afe0c11db914894cb4b0 (diff) | |
download | rails-19c9c7fafbc7c808c080317a1326c4fbc6068bea.tar.gz rails-19c9c7fafbc7c808c080317a1326c4fbc6068bea.tar.bz2 rails-19c9c7fafbc7c808c080317a1326c4fbc6068bea.zip |
Set default charset of MTAs to ISO instead of us-ascii (unless reported otherwise)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7819 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionmailer/lib/action_mailer/vendor/tmail/quoting.rb')
-rw-r--r-- | actionmailer/lib/action_mailer/vendor/tmail/quoting.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb b/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb index a7e5c44710..f27234fcfe 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb @@ -8,6 +8,12 @@ module TMail from_charset = sub_header("content-type", "charset") case (content_transfer_encoding || "7bit").downcase when "quoted-printable" + # the default charset is set to iso-8859-1 instead of 'us-ascii'. + # This is needed as many mailer do not set the charset but send in ISO. This is only used if no charset is set. + if !from_charset.blank? && from_charset.downcase == 'us-ascii' + from_charset = 'iso-8859-1' + end + Unquoter.unquote_quoted_printable_and_convert_to(quoted_body, to_charset, from_charset, true) when "base64" |