Are you setting the content type appropriately and at the appropriate
time(s) -
public void ServletResponse.setContentType( String type)
to set the Content-Type HTTP header? If you are using the getWriter()
method of
public PrintWriter ServletResponse.getWriter()
the writer encodes characters according to whatever charset is given
in the content type. Examples, for WAP (WML):
response.setContentType( text/vnd.wap.wml)
For Excel spreadsheets:
response.setContentType( application/octet-stream)
You can find the MIME spec at:
http://www.cis.ohio-state.edu/cgi-bin/rfc/rfc2046.html
The default content type is ISO-8859-1 (Latin 1). "...it's good form
to always set the content type before instantiating a PrintWriter."
(Hunter & Crawford, "Java Servlet Programming," p. 126)
Cheers!
Mark
----- Original Message -----
From: "Ramesh, Kesav" <[EMAIL PROTECTED]>
Sent: Thursday, April 12, 2001 7:03 AM
> i am facing a imilar problem whil eusing javamail. i am using
base-64 for
> encoding.how will i do it with UTF-8? i am not able to send
atachments of
> excel and word other things or attached fine for me.
>
> can you help me out.
>
> Regards
>
> Ramesh Kesavanarayanan
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html