Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Help! Internationalization utf8 FAILS on hotmail

843830Jun 1 2004 — edited Oct 25 2005
Hi ! How do I send UTF8 emails to Hotmail ??

Here's my code

// Define message
MimeMessage message = new MimeMessage(session);
message.setFrom(new InternetAddress(from));
message.setReplyTo(addressReplyTo);
message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
message.setSubject(subject, "UTF-8");
message.setText(text, "UTF-8");

My jsp app is internationalized with utf8, with resource bundles in english estonian and russian. Each jsp page has <% page ... %> directive and request.setCharacterEncoding to utf8.

PROBLEM:
When my code sends a mail to an outlook client all the foreign characters come up great.
But send it to hotmail (and certain other webmails) and it comes out gibberish.

Is this a "microsoft" thing... is there a trick to it ? Maybe I need to spell "utf8" or "utf-8"... or maybe I need to do a manual byte conversion to UTF8 something like:

message.setText( new String(text.getBytes(), "UTF-8"), "UTF-8") ???

The cynical side of me would say msoft are intentionally trying to screw up open standards like utf8 by not processing them correctly ?

Can anyone please post some sample code.

extra info:
tomcat 4


Help!!!!
Cheers
vikingSteve

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Nov 22 2005
Added on Jun 1 2004
11 comments
202 views