Posting chinese letters to a servlet

Discussion in 'Java' started by Crouchinho, Sep 26, 2006.

  1. Crouchinho

    Crouchinho Guest

    I have a html form which I use to send text info to a servlet, but when it
    receives this text in a language such as chinese (cut and pasted from a
    chinese site) the servlet can't recogise it and see's only ?'s or character
    number 65533. How do I go about getting the servlet to get this info back
    into chinese (or whatever other multibyte encoding) especially when it is
    unknown exactly what was the posted language?
    Crouchinho, Sep 26, 2006
    #1
    1. Advertising

  2. Crouchinho wrote:
    > I have a html form which I use to send text info to a servlet, but when it
    > receives this text in a language such as chinese (cut and pasted from a
    > chinese site) the servlet can't recogise it and see's only ?'s or character
    > number 65533. How do I go about getting the servlet to get this info back
    > into chinese (or whatever other multibyte encoding) especially when it is
    > unknown exactly what was the posted language?


    Does this help at all:
    http://java.sun.com/developer/technicalArticles/Intl/HTTPCharset/

    You should concentrate on a few areas to find the problem:
    * the charset of the HTML form and page
    * the charset used in your servlet to convert form parameters and
    incoming data
    * the db charset

    --
    John O'Conner
    John O'Conner, Sep 26, 2006
    #2
    1. Advertising

  3. Crouchinho

    Crouchinho Guest

    "John O'Conner" <> wrote in message
    news:...
    >
    > Crouchinho wrote:
    >> I have a html form which I use to send text info to a servlet, but when
    >> it
    >> receives this text in a language such as chinese (cut and pasted from a
    >> chinese site) the servlet can't recogise it and see's only ?'s or
    >> character
    >> number 65533. How do I go about getting the servlet to get this info back
    >> into chinese (or whatever other multibyte encoding) especially when it is
    >> unknown exactly what was the posted language?

    >
    > Does this help at all:
    > http://java.sun.com/developer/technicalArticles/Intl/HTTPCharset/
    >
    > You should concentrate on a few areas to find the problem:
    > * the charset of the HTML form and page
    > * the charset used in your servlet to convert form parameters and
    > incoming data
    > * the db charset
    >
    > --
    > John O'Conner
    >


    cheers for the reply. I've fixed it - it turns out i was encoding it twice
    on the servlet
    Crouchinho, Sep 27, 2006
    #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. circuit_breaker
    Replies:
    2
    Views:
    1,981
    Jack Jia
    Apr 4, 2004
  2. Martin Fuchs
    Replies:
    2
    Views:
    1,058
    Martin Fuchs
    Mar 29, 2005
  3. Merrigan
    Replies:
    4
    Views:
    558
    Chris
    Dec 14, 2007
  4. Julia

    Problem POSTING hebrew letters

    Julia, Apr 10, 2005, in forum: ASP General
    Replies:
    0
    Views:
    167
    Julia
    Apr 10, 2005
  5. Venugopal
    Replies:
    11
    Views:
    1,496
    Tassilo v. Parseval
    Nov 5, 2003
Loading...

Share This Page