2 Replies Latest reply on Mar 31, 2010 11:08 AM by 843810

    Chinese locale date getting junk characters

      I m calling servlet using below given line of code.
      MyServlet is mapping of my servlet.
      function getData(){
           document.location = '../../MyServlet?svalue='+svalue+'&'+ pbody;
      this js function is written in jsp which has set
      <%@ page contentType="text/html;charset=UTF-8"%>
      <META http-equiv="Content-Type" content="text/html; charset=UTF-8">

      When the browser is in the chinese language, my "myDate: field have date set in chinese locale.

      but when I m retrieving field set in request parameter using = request.getParameter("myDate");

      I get junk characters in my servlet because of which date parsing fails.

      Do u have idea why this mught be happening ?
        • 1. Re: Chinese locale date getting junk characters
          This article might help:

          [Character Conversion from Browser to Database|http://java.sun.com/developer/technicalArticles/Intl/HTTPCharset/]
          • 2. Re: Chinese locale date getting junk characters
            <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
            port="8080" maxHttpHeaderSize="8192"
            maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
            enableLookups="false" redirectPort="8443" acceptCount="100"
            connectionTimeout="20000" disableUploadTimeout="true"
            useBodyEncodingForURI ="true"
            I have added below given parameters:
            useBodyEncodingForURI ="true"

            But I would like to know, if anyone know any bad effects of this ?We will be using UTF-8 encoding in our application.