Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2007

Tip: Looking for answers? Try searching our database.

Posting unicode characters from a form

Thread view: 
dschectman@yahoo.com - 26 Mar 2007 16:08 GMT
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
Andreas Leitgeb - 27 Mar 2007 08:55 GMT
> 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.
dschectman@yahoo.com - 11 Apr 2007 17:42 GMT
On Mar 27, 3:55 am, Andreas Leitgeb <a...@gamma.logic.tuwien.ac.at>
wrote:
> dschect...@yahoo.com <dschect...@yahoo.com> wrote:
> > reuqest.getParameter returns a string that appears to be partially
[quoted text clipped - 8 lines]
>
> 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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.