Hi,
I also met this problem last month with Chinese BIG5 charset. The problem
was occured with HTML encoding and JDBC data source output to HTML. There
was be only one item can be displayed, another item will be displayed as ??.
I removed all character encoding in servlet then built my class with follow:
javac -encoding ISO8859-1 myclass.java
All Chinese display is correct.
For your reference...
Robin Lin
----- Original Message -----
From: "Zeng, Feng_Hua (CAP,CEF)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 19, 2001 5:32 PM
Subject: Unsupported character encoding under JWS2.0 ?
> Hello, fellows,
>
> Here I need help from everyone of you.
> The attached little servlet seems no wrong,
> however, when non-Latin characters ( here Japanese,
> but I think other language might come accross the
> same problem) are input in front of the "Submit" button,
> the result page will get a string filled with "??".
> There must be some important tips such like JWS's
> configuration? Or I wrongly used the OutputStream?
> Any guidance will be appreciated.
>
>
> import java.io.*;
> import javax.servlet.*;
> import javax.servlet.http.*;
>
> public class ServletTest1 extends HttpServlet
> {
> public void doGet(HttpServletRequest req, HttpServletResponse
resp)
> throws ServletException, IOException
> {
> resp.setContentType("text/html; charset=Shift_JIS");
> PrintWriter out = new PrintWriter(resp.getOutputStream());
>
> out.println("<HTML>");
> out.println("<HEAD>");
> out.println("<TITLE>ServletTest1: GET</TITLE>");
> out.println("<META HTTP-EQUIV=\"Content-Type\"
> CONTENT=\"text/html; charset=Shift_JIS\">");
> out.println("</HEAD>");
> out.println("<BODY>");
>
> out.println("<CENTER>");
>
> out.println("<form method=post action='" +
> req.getServletPath() + "'>");
> out.println("<input type=text name=inputText><input
> type=submit value='Submit'>");
> out.println("</form>");
>
> out.println("</CENTER>");
>
> out.println("</BODY>");
> out.println("</HTML>");
> out.flush();
> out.close();
> }
>
> public void doPost(HttpServletRequest req, HttpServletResponse
resp)
> throws ServletException, IOException
> {
> String inputText = req.getParameter("inputText");
>
> resp.setContentType("text/html; charset=Shift_JIS");
> PrintWriter out = new PrintWriter(resp.getOutputStream());
>
> out.println("<HTML>");
> out.println("<HEAD>");
> out.println("<TITLE>ServletTest1: POST</TITLE>");
> out.println("<META HTTP-EQUIV=\"Content-Type\"
> CONTENT=\"text/html; charset=Shift_JIS\">");
> out.println("</HEAD>");
> out.println("<BODY>");
>
> out.println("<CENTER>");
>
> out.println("<FORM>");
> out.println("<input type=text name=inputText value='" +
req.
> getParameter("inputText") + "'>");
> out.println("<input type=button value='Back'
> onclick='history.back()'>");
> out.println("</FORM>");
>
> out.println("</CENTER>");
>
> out.println("</BODY>");
> out.println("</HTML>");
> out.flush();
> out.close();
> }
> }
>
> ----------------------------------------
> Romantic Emotionalists Must Endure Ordeals.
> Email1(200103): [EMAIL PROTECTED]
> Email2(200011): [EMAIL PROTECTED]
> Email3(199908): [EMAIL PROTECTED]
> Email4(199906): [EMAIL PROTECTED]
> Office: Tokyo, Japan http://www.gecapital.com
> Home: Dalian, Liaoning, China (Hometown: Hunan)
> ----------------------------------------
>
>
___________________________________________________________________________
> 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
- Unsupported character encoding under JWS2.0 ? Zeng, Feng_Hua (CAP,CEF)
- Re: Unsupported character encoding under JWS... Weitsong Lin
- Re: Unsupported character encoding under JWS... Arockia Joseph
- Re: Unsupported character encoding under JWS... Zeng, Feng_Hua (CAP,CEF)
- Re: Unsupported character encoding under... Weitsong Lin
