1 Reply Latest reply on Feb 4, 2009 2:08 AM by chicken

    I have a problem with character display when convert from We

      Dear all

      I am convert a web application from Weblogic to JBoss 4.3.0.

      now I can not display character correctly.

      I try to make a servlet it gets charset value from charset parameter and displays a java string in corresponding char set:


      public void doPost(HttpServletRequest request, HttpServletResponse response)
       throws ServletException, IOException {
      
       if (true) {
       String cs = request.getParameter("charset");
       System.out.println("CS. : " + cs);
       response.setContentType("text/html; charSet=" + cs);
       response.setHeader("Content-Type", "text/html; charSet=" + cs);
       PrintWriter out1 = response.getWriter();
       String tmp = "some Korean characters: ÃÂŽ˜ìÂÂ�´ê²ŒìÂÂ�´ÃŠ¸ 결제 ";
       out1.println(tmp);
      
       return;
       }
       }

      I tested the sevlet with different input char set: UTF-8, EUC-KR, ... but I did not success!

      if you have experience with this problem, please give me some suggestions to solve it.

      Thank in advance!