dcsimg
subject-Field in email is not encoded the right way.
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Thursday, March 13, 2003 03:05 AM

Hello! My application sends some emails and the reciever of the emails want to read german text. But i have some problems with the encoding, especially for the subject field. The German Ü, Ä,Ö make some problems. The following works for the email-text: MimeMessage msg; ... msg.setHeader("Content-Type","text/plain; charset=ISO-8859-1"); But it doesn't work for the subject field. There the German Ü,Ä,Ö are still presented the wrong way. I tried msg.setSubject(getSubject(),"text/plain; charset=ISO-8859-1"); But I get the following error: java.io.UnsupportedEn   More>>

Hello!
My application sends some emails and the reciever of the emails want to read german text.

But i have some problems with the encoding, especially for the subject field.

The German Ü, Ä,Ö make some problems.


The following works for the email-text:


			
MimeMessage msg; ...
msg.setHeader("Content-Type","text/plain; charset=ISO-8859-1");



But it doesn't work for the subject field. There the
German Ü,Ä,Ö are still presented the
wrong way.


I tried


			
msg.setSubject(getSubject(),"text/plain; charset=ISO-8859-1");


But I get the following error: java.io.UnsupportedEncodingException: text/plain; charset=ISO-8859-1

Has anyone an idea?

Thanks.

Thomas    <<Less

Re: subject-Field in email is not encoded the right way.

Posted By:   Christopher_Koenigsberg  
Posted On:   Thursday, March 13, 2003 06:42 AM

Re: subject-Field in email is not encoded the right way.

Posted By:   Anonymous  
Posted On:   Thursday, March 13, 2003 04:20 AM

I think you are missing quotes, and required escape characters (backslashes). For example:


body.setContent(HTMLtext,"text/html;charset="UTF-8"");


John S
Aylmer, PQ
About | Sitemap | Contact