From bf2bddd29fca60754d6aba60b55d109f5b78fb48 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 2 Sep 2006 19:31:45 +0000 Subject: Fixed that iconv decoding should catch InvalidEncoding #3153 [jon@siliconcircus.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4901 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionmailer/lib/action_mailer/vendor/tmail/quoting.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (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 a56e2267ee..c73157fe61 100644 --- a/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb +++ b/actionmailer/lib/action_mailer/vendor/tmail/quoting.rb @@ -80,7 +80,7 @@ module TMail def convert_to(text, to, from) return text unless to && from text ? Iconv.iconv(to, from, text).first : "" - rescue Iconv::IllegalSequence, Errno::EINVAL + rescue Iconv::IllegalSequence, Iconv::InvalidEncoding, Errno::EINVAL # 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. -- cgit v1.2.3