wood burning stoves 2.0*
The moose likes Other JSE/JEE APIs and the fly likes Problem viewing German umlauts in certain Outlook 20003 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Problem viewing German umlauts in certain Outlook 20003" Watch "Problem viewing German umlauts in certain Outlook 20003" New topic
Author

Problem viewing German umlauts in certain Outlook 20003

Arnab Ghosh
Greenhorn

Joined: May 31, 2004
Posts: 2
Dear Friends,

I have a very specific problem related to javax.mail api, and I have no clue as of now whether it is a problem with my code, or whether a problem with some client side infrastructure. It would be very helpful if someone could post some advise here.

I'm using javax.mail api to construct a multipart message. This application is being used to send mails in German language and hence German umlauts and special characters constitutes a part of the emails (for eg Ä,ä,Ü,ü,Ö,ö,ß etc). Now when the mails are sent out, these characters are visible in almost all email clients for eg Hotmail, Gmail, IBM's Lotus Notes etc. But our client uses Microsoft Outlook 2003, and it seems the umlauts vanishes from the mail body. They are replaced by blank spaces !!

We have tried installing MS Outlook 2003 to our local systems, and configure it to Gmail, and were not able to reproduce the problem. Hence I understand this is not a typical problem with Outlook 03, however have no clue what the problem could be. It could be a problem with the code, or with our client's infrastructure but I'm looking for specific answers here.

I paste here the relevant portions of the source code.
The following part of the code snippet initializes the multipart message:
MimeMultipart lRoot = new MimeMultipart ( "mixed" );
MimeMultipart lContent = new MimeMultipart( "alternative" );
MimeBodyPart lTextPart = new MimeBodyPart();
MimeBodyPart lHtmlPart = new MimeBodyPart();

The following part sets the body text
lTextPart.setText( <This part is blank>, "utf-8" );
lTextPart.setHeader( "MIME-Version" , "1.0" );
lTextPart.setHeader( "Content-Type" , lTextPart.getContentType() );

lHtmlPart.setContent( <Actual HTML content part>, "text/html");
lHtmlPart.setHeader( "MIME-Version" , "1.0" );
lHtmlPart.setHeader( "Content-Type" , "text/html" );
lHtmlPart.setHeader( "charset" , "utf-8" );

The parts within <> are strings conatining mail body which has those special umlaut characters. The lTextPart is normally blank and hence I won't bother about its contents.

I have also tried the following line for lHtmlPart, but it does not solve the problem
lHtmlPart.setContent( <Actual HTML content part>, "text/html; charset=utf-8");

Do let me know if I need to furnish some more details here. And if somebody could suggest what might be wrong at our client's infra end, that might also be very helpful.
Any help would be deeply appreciated.

Regards,
Arnab.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem viewing German umlauts in certain Outlook 20003
 
Similar Threads
Java Mail text and html with attachment
Converting to Upper Case
JavaMail set content to utf-8
Multilingual Content
s:submit key 's i18n problem