From 19da52d69db92995eb518875b60e72b61f83469a Mon Sep 17 00:00:00 2001 From: Jamis Buck Date: Mon, 30 May 2005 23:09:50 +0000 Subject: 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 --- actionmailer/lib/action_mailer/vendor/tmail/quoting.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'actionmailer/lib') 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 -- cgit v1.2.3