Internationalization was common issue with Tomcat 3 (or rather with servlet
spec 2.2).

If you can forget about Tomcat 3 - do not hesitate. If you can't - try
"com.oreilly.servlet" package available at http://www.servlets.com. It
worked for me perfectly in the past (not with Japanese locale but with
Russian one - not big difference :)

Now regarding your Tomcat 4 issues.

1) The OS needs not be Japanese and needs not have Japanese as default
locale. But what definitely needs be i18n-enabled is your JRE. Are you sure
your JRE/JDK is not English-only?

2) If JRE is ok it may be a good idea to check if your OS has Japanese
encodings support (though being an English edition). It is not an issue for
Windows 2000, but for English edition it is not the default and requires
explicit expression of your wish during setup. And you can always request
for it afterwards using Control Panel. But frankly speaking I have a vague
idea how much JRE depends on OS for encoding translations.

2) Are you sure your browser sends UTF-8? Maybe try other Japanese
encodings?

HTH.
Regards,
Sergey

P.S. Keep trying... It should work :)



----- Original Message -----
From: "mubariz kharbe" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 12, 2002 4:03 PM
Subject: Problem with passing japanese values to a servlet


> 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]>
>
>


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

Reply via email to