Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Posting chinese letters to a servlet

Reply
Thread Tools

Posting chinese letters to a servlet

 
 
Crouchinho
Guest
Posts: n/a
 
      09-26-2006
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?


 
Reply With Quote
 
 
 
 
John O'Conner
Guest
Posts: n/a
 
      09-26-2006

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/techni...l/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

 
Reply With Quote
 
 
 
 
Crouchinho
Guest
Posts: n/a
 
      09-27-2006

"John O'Conner" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
>
> 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/techni...l/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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
making all letters Caps/Small Letters Merrigan Python 4 12-14-2007 10:10 AM
Problem POSTING hebrew letters Julia ASP General 0 04-10-2005 10:48 AM
Re: How do I translate a Chinese web site and add Chinese character set to IE..? =A0 - =A0 Taking these two questions one at a time... =A Patrick Dunford NZ Computing 3 04-28-2004 07:15 PM
Servlet question(Tomcat, web.xml, servlet-class, servlet-name) circuit_breaker Java 2 04-04-2004 03:26 AM
Changing from capital letters to small letters using perl Venugopal Perl Misc 11 11-05-2003 06:07 PM



Advertisments