app/presenters/mail_presenter.rb
# forcing the encoding of the content to UTF-8 so as to be compatible with database and serializers
forcing the encoding of the content to UTF-8 so as to be compatible with database and serializers
forcing the encoding of the content to UTF - 8 so as to be compatible with database and serializers
def encode_to_unicode(str)
    current_encoding = str.encoding.name
    return str if current_encoding == 'UTF-8'
    str.encode(current_encoding, 'UTF-8', invalid: :replace, undef: :replace, replace: '?')
  end
def encode_to_unicode ( str ) current_encoding = str . encoding . name return str if current_encoding == 'UTF-8' str . encode ( current_encoding , 'UTF-8' , invalid : :replace , undef : :replace , replace : '?' ) end
forcing the encoding of the content to UTF-8 so as to be compatible with database and serializers
forcing the encoding of the content to UTF - 8 so as to be compatible with database and serializers
str
<not_specific>