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!

Email in Russian language fail.

843830May 21 2006 — edited May 25 2006
Hello,

I have a need to send out an email that contains Russian letters. From current code that I have end user gets question marks instead of actual letters.

Here is some code that I have:
MimeMessage msg=new MimeMessage(session);
String subject = "russian letters go here";
msg.setSubject = subject;
This is just a sample for a subject of an email.
There is another problem with body of the message itself (question marks as well).

Do you have any ideas how to make it work?
I tried something like this as well

byte[] array = subject.getBytes(subject, "Cp1251");
String newSubjecct = new String(array, "koi8-r");

I am not sure how to make it work. I'd appreciate if somebody can share ideas.

Thank you.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 22 2006
Added on May 21 2006
24 comments
861 views