aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib
diff options
context:
space:
mode:
authorJamis Buck <jamis@37signals.com>2005-05-30 23:09:50 +0000
committerJamis Buck <jamis@37signals.com>2005-05-30 23:09:50 +0000
commit19da52d69db92995eb518875b60e72b61f83469a (patch)
tree8db81b7bd13d8fa19c70d8cacc097daa716c1d35 /actionmailer/lib
parent6ce58318f5c1446c33599e3d0d19491618c684a6 (diff)
downloadrails-19da52d69db92995eb518875b60e72b61f83469a.tar.gz
rails-19da52d69db92995eb518875b60e72b61f83469a.tar.bz2
rails-19da52d69db92995eb518875b60e72b61f83469a.zip
Ignore Iconv::IllegalSequence errors when converting text #1341 [lon@speedymac.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1374 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionmailer/lib')
-rw-r--r--actionmailer/lib/action_mailer/vendor/tmail/quoting.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb b/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb
index 6494b592d6..43e834b2a6 100644
--- a/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb
+++ b/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb
@@ -72,6 +72,11 @@ module TMail
def convert_to(text, to, from)
return text unless to && from
text ? Iconv.iconv(to, from, text).first : ""
+ rescue Iconv::IllegalSequence
+ # the 'from' parameter specifies a charset other than what the text
+ # actually is...not much we can do in this case but just return the
+ # unconverted text.
+ text
end
rescue LoadError
# Not providing quoting support