Posting unicode characters from a form

Discussion in 'Java' started by dschectman@yahoo.com, Mar 26, 2007.

  1. Guest

    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
    , Mar 26, 2007
    #1
    1. Advertising

  2. <> wrote:
    > 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.
    Andreas Leitgeb, Mar 27, 2007
    #2
    1. Advertising

  3. Guest

    On Mar 27, 3:55 am, Andreas Leitgeb <>
    wrote:
    > <> wrote:
    > > 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.


    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.
    , Apr 11, 2007
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Luc Feys
    Replies:
    1
    Views:
    609
    Thomas Weidenfeller
    Oct 22, 2003
  2. Laszlo Nagy
    Replies:
    6
    Views:
    601
  3. Terry Reedy
    Replies:
    0
    Views:
    500
    Terry Reedy
    Jul 1, 2008
  4. M.-A. Lemburg
    Replies:
    0
    Views:
    882
    M.-A. Lemburg
    Jul 2, 2008
  5. Grzegorz ¦liwiñski
    Replies:
    2
    Views:
    940
    Grzegorz ¦liwiñski
    Jan 19, 2011
Loading...

Share This Page