Are you using WSAD on Windows and Tomcat on Unix/Linux?


----- Original Message ----- From: "Anjishnu Bandyopadhyay" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Tuesday, March 21, 2006 5:51 AM
Subject: Problem with character encoding.



Hi all,



I am generating a MS Word document through a JSP, by setting the JSP's
content type as "application/msword;".

The ".doc" that is generated contains accentuated French characters
(special French characters).



I use Websphere (WSAD) to develop the code, but use Tomcat server for
deployment & final testing.

In WSAD, the ".doc" file that is generated properly displays the special
characters. But, in Tomcat, these characters are broken (distorted).



The code snippet (in JSP) is as follows:

<%@ page language="java" contentType="application/msword; charset=UTF-8"
pageEncoding="UTF-8" %>

<%

     String fileName = "abc.doc";

     response.setContentType("application/msword");

     response.setLocale(java.util.Locale.FRENCH);

     response.setHeader("Content-Disposition","attachment;filename="+
fileName);

%>



Can anyone give me some pointer, regarding the problem might be? Am I
missing out something?



Thanks for your time.



With best regards,

Anjishnu.





**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system. ***INFOSYS******** End of Disclaimer ********INFOSYS***

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to