Permalink
Browse files

Fixed that iconv decoding should catch InvalidEncoding #3153 [jon@sil…

…iconcircus.com]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4901 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
dhh committed Sep 2, 2006
1 parent 9db407f commit bf2bddd29fca60754d6aba60b55d109f5b78fb48
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionmailer/lib/action_mailer/vendor/tmail/quoting.rb
@@ -80,7 +80,7 @@ def unquote_base64_and_convert_to(text, to, from)
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.

0 comments on commit bf2bddd

Please sign in to comment.