File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes request.getParameter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "request.getParameter" Watch "request.getParameter" New topic


stanley wang

Joined: Jun 24, 2002
Posts: 12
Hi guys:
I am a chinese.
These days, I am tring to use the request.getParameter() to get the value of the textarea.
<textarea name="message_content" rows="6" cols="42" ><%=messagecontent%></textarea>
when the form submit I can get message_content value using the expression as follow:
but the strange thing is that :
I can get the English characters in correct way, but the Chinese word will be strange!
Anything wrong with me??
Manish Hatwalne
Ranch Hand

Joined: Sep 22, 2001
Posts: 2591

Use correct type of charset in your form tag and make sure that your browser supports it. You can do it using -
<form action="whatever" method="whatevver" ACCEPT-CHARSET="en-us,more_values_here">
<!-- Your textfield here -->
Have a look at this for listing of charset
- Manish
stanley wang

Joined: Jun 24, 2002
Posts: 12
I can get the traditional Chinese, Simple Chinese at the same time. I change the page's charset="GBK" .It's very important.
I don't know why the GBK is correct and the GB2312 don't work.Could anybody do me a favor?
I agree. Here's the link:
subject: request.getParameter
It's not a secret anymore!