Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JavaMail - Multilang Emails

 
anandm mathuria
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are storing Chinese / Japanese / Korean data in UTF-8 format in the database. If we want to dispaly that data on a browser through a JSP / Servlet, we use
response.setContentType("text/html;charset=UTF-8");
This automatically changes the browser's setting (view/encoding) to UTF-8 & data of the above languages is displayed correctly.
Now we also have to send an email message which is formed dynamically using some values from the database (e.g. first name, seminar_name etc.). We are using JavaMail API for this & we use
MimeMessage.setContent(string_message,"text/html;charset=UTF-8");
There are 2 probs in the above approach:
1. Say a mail is sent with Japanese data. A user having Jap-NT/Jap-MS-Outlook can view it perfectly but the same email will show junk in English NT.
2. The same email when viewed from say yahoo/hotmail etc. will show correctly only if I manually change the Browser Setting (view/Encoding) to UTF-8.
Do you have any material / solution as to how to send multilang emails which can be seen even on English-NT/Outlook? Please mail me any info that u have on abv.
my email: anandmathuria@rediffmail.com
thanks a lot in advance.
regards,
anand
 
anandm mathuria
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi John... pls help if u know a soln to this.
Thanks a lot in advance :-)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic