# File lib/vmail/message_formatter.rb, line 134 def utf8(string, this_encoding = encoding) return '' unless string out = if this_encoding && this_encoding.upcase != 'UTF-8' Iconv.conv('UTF-8//TRANSLIT/IGNORE', this_encoding, string) elsif this_encoding.upcase == 'UTF-8' string else # assume UTF-8 Iconv.conv('US-ASCII//TRANSLIT/IGNORE', 'UTF-8', string) end out rescue "[error: #$!]" end