class method
self.convert_to
Ruby on Rails 2.3.18
Since v2.2.3 Last seen in v2.3.18Available in: v2.2.3 v2.3.18
Signature
self.convert_to(text, to, from)
No documentation comment.
Parameters
-
textreq -
toreq -
fromreq
Source
# File actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/quoting.rb, line 139
def convert_to(text, to, from)
return text unless to && from
text ? Iconv.iconv(to, from, text).first : ""
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.
#
# Ditto if either parameter represents an unknown charset, like
# X-UNKNOWN.
text
end
Defined in actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/quoting.rb line 139
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in TMail::Unquoter