From: gaosheng <[EMAIL PROTECTED]>
Subject: **UNKNOWN CHARSET****UNKNOWN CHARSET**
Date: Mon, 8 Mar 1999 17:17:20 +0800
Message-ID: <>
> HI: zhuang!
> thank you for the answer
> I used the line:
> res.setContentType("text/html ,charset=gb2312");
> but it can not work well,if there is something I should notice specially??
res.setContentType("text/html; charset=gb2312");
^ use here, ";"
and get PrintWriter
PrintWriter pw = res.getWriter();
pw.println("<chinese character>");
If you still have a problem, the getWriter() method may have
a bug. So try this:
OutputStreamWriter osw =
new OutputStreamWriter(response.getOutputStream(), "gb2312");
PrintWriter pw = new PrintWriter(osw);
pw.println("<chinese character>");
Hope this helps.
---
Yoko Kamei Harada
Media Network Laboratories, R&D Group
Oki Electric Industry Co., Ltd.
___________________________________________________________________________
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