Hi,

I am developing an internationalized web based application using Tomcat 3.1 on Windows 
2000. I am facing the following problems

When I pass Japanese values to the servlet and I retreive the value using 
        myData = httpservletrequest.getParameter("foo");
I get ?? in myData.
So I used
        myDataNew = new String(myData.getBytes("ISO-8859-1"),"UTF-8");
This is the solution that is found at most forums I looked for.
I still get the value of myDataNew as ??.
I am able to get the correct value in myDataNew only after I boot my server with 
default locale as Japanese. But I cannot do that since my application is web based and 
needs to have support for all the languages. So the server should necessarily be on 
English OS. This is also the business requirement.

Question 1. What should be done so that running the server on English OS I will be 
able to get the correct value in myData for all the languages, specially Japanese?

The new tomcat 4.0.3 uses the Servlet Engine 2.3 in which there is a facility to set 
the character encoding for the httpservletrequest. I upgraded my tomcat server to 
4.0.3.
Now I tried using 
        httpservletrequest.setCharacterEncoding("UTF-8");
        myData = httpservletrequest.getParameter("foo");
And I am still getting the value of myData as ?? for Japanese values.

Question 2. Is there a problem in the way I am using 
httpservletrequest.setCharacterEncoding method? What else is needed to be done?

Any advice will be greatly appreciated.

Thanking in anticipation
Regards
Mubariz
        





    
                

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to