Posting unicode characters from a form

D

dschectman

I have an application running on iplanet app server 6.5/web server
6.0. The application server exclusively handles servlets and JSPS.

I created a test form that posts one field to the server. I then
created a JSP that gets the value of the field posted to display on
the screen. Both files set the encoding to UTF-8.

reuqest.getParameter returns a string that appears to be partially
utf-8 encoded and partially ISO-8895-1 encoded. I have to transoform
the string with String correctValue= new
String(name.getBytes("ISO-8859-1"), "utf-8"); in order to display the
Japanese characters

I set the UTF-8 enconding the web server web-apps.xml. This has no
impact on the application server. Is there a similar confiuration for
the app server or is ISO encoding built in to the web connector? If
possible I would like ot avoid adding the above transformation to all
servlets and JSPS that call request.getParameter

Thanks,

David
 
A

Andreas Leitgeb

reuqest.getParameter returns a string that appears to be partially
utf-8 encoded and partially ISO-8895-1 encoded.

One string with mixed encoding?

One usualy suspect might be the browser: Which one do you
use, and is there a way to intercept the communication
between browser and server? Perhaps the browser sends
utf-8 data but declares it as being iso-8859-1.

Just speculation.
 
D

dschectman

One string with mixed encoding?

One usualy suspect might be the browser: Which one do you
use, and is there a way to intercept the communication
between browser and server? Perhaps the browser sends
utf-8 data but declares it as being iso-8859-1.

Just speculation.

When I run the same JSP off the web server. The encoding is purely
utf-8. It is only when I run the JSP off the application server that
I see mixed encoding. The documentation for versions 7.X of the
application server refers to a hidden form variable that identifies
the encoding of form data. This leads me to believe that the mixed
encoding may be built in to the GX plug-in, which transfers
information between the web server and the application server.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,817
Latest member
DicWeils

Latest Threads

Top