• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

JavaMail - Multilang Emails

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi John... pls help if u know a soln to this.
Thanks a lot in advance :-)
 
grapes are vegan food pellets. Eat this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic