I am receiving incoming mails through sendgrid. When I receive an email with German language that contains umlaut characters in the params
it is showing the full content, but when I read and save, it is not saving after the umlaut character. I did a utf-8 conversion with
Iconv.conv('utf-8','ISO-8859-1' , str)
and, it is giving me the unicode string, but if I send the outgoing encoding as utf-8 in my gmail and send, it is working prope开发者_JAVA技巧rly. I can't rely on it as my customers may send without utf8 setting. Please let me know what should be done.
I achieved Iconv.new('utf-8', charset_encoding).iconv(params[:text])
精彩评论