Hi:
thank you for your answer; I tried the fllowing method you have mentioned in
you r replay to me :
res.setContentType("text/html; charset=gb2312");
^ use here, ";"
and get PrintWriter
PrintWriter pw = res.getWriter();
pw.println("<chinese character>");
but when I used the javac to complie my .java fie it told me that :
Servlet.java:50: Method getWriter() not found in interface javax.servl
et.http.HttpServletResponse.
PrintWriter pw = res.getWriter();
why?? I am puzzled! can you tell me the reason? thanks in advance!!
gaosheng
-----Original Message-----
������: Yoko Kamei Harada <[EMAIL PROTECTED]>
�ռ���: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
����: 1999��3��8�� 18:03
����: Re: **UNKNOWN CHARSET****UNKNOWN CHARSET**
>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
___________________________________________________________________________
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