Chinese in JSP, Chinese garbled often make people utterly confused. General Solutions
One, this page shows the problem
"<%@ page contenttype=" text/html;charset=gb2312 "%>"
Ii. Submission of questions
Given this problem, you can convert the read string, which is simple:
str = request.getparameter ("s");
str = new String (str.getbytes ("iso-8859-1"), "GBK");
or set
Request.setcharacterencoding ("GBK");
However, do you encounter this situation, the use of Out.println is Chinese, systemout.println is garbled, look at the following example
After compiling in IE run, myedit input Chinese characters, will appear I say garbled, can not underestimate, to you useful System.out.println output, I after repeated debugging, found will
<input type= "text" name= "Myt" "size=" "value =" ">" "", there is no problem. "We often use is empty, in the end what is the problem caused, I still do not know."
I have this problem with the jbuild7.0,jdevelop9.03.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service