Hi,

from a java application I build an URL and encode the URL parameters with
URLEncoder.encode(str, "UTF-8") and than I create a connection with:

        URLConnection uconn = URL.openConnection();
        InputStream inputStream = uconn.getInputStream();
...

In the tomcat (4.1.29) servlet I always call:
        request.setCharacterEncoding("UTF-8")

but I still need:
        new String(value.getBytes("ISO-8859-1"), "UTF-8");

to get the passed parameter correctly.

What is my mistake?


I use jdk-1.4.2_02 Windows-Xp.

Zsolt




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

Reply via email to