There is an earlier post http://mail-archives.apache.org/mod_mbox/struts-user/200603.mbox/[EMAIL PROTECTED] My problem is pretty much the same as described. But there is no soluton to it. My application is Tomcat + Struts. In the struts action class, I generates a WordML xml and the browser starts a word. The word document may contain Chinese character. My source code is something like: response.setContentType("application/msword; charset=UTF-8"); java.io.PrintWriter out = response.getWriter(); out.println(outLine); out.close();
outLine is a big string, with the first 2 lines as the following: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?mso-application progid="Word.Document"?> Now the weird thing is when I run this on my desktop, with Chinese Windows XP installed. Everything is fine. But when I run this on a production server with English version Windows 2003 installed, all chinese characters are displayed as ??. After I changed the code to: response.setContentType("text/xml; charset=UTF-8"); regardless of where I run the application, it can correctly display chinese characters, though in a text version. Any help is appreciated. SC -- View this message in context: http://www.nabble.com/WordML-encoding-problem-tf3833007.html#a10851477 Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]