In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail what are the common countermeasures for Chinese processing in jsp. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.
For the common countermeasures of Chinese processing, the main ones that can be seen on the Internet are as follows:
Or:
The virtual Xiaolong Pavilion has also been modified mainly by the above two methods, which has become version 1.1.
To sum up briefly, the Chinese processing in the example takes place in the following places:
1 Chinese parameters are attached to url, which can be read directly.
For example:
2 various sql operations related to database
There is no problem with the Access used here.
3 read the Chinese value submitted in the HTML form form
It needs to be coded in jswdk, which can be written in simpler ways such as:
String name1=new String (request.getParameter ("user_id") .getBytes ("ISO8859_1"))
In addition, with the support of jdk1.3, there is no need to join
Under jdk1.2.2, it is unstable even if the two methods are used at the same time.
On the resin platform, the situation is better. Just add to the first line of the page:
Chinese can be handled correctly.
If you add the code, it will be wrong.
5 Chinese included in session
In jswdk, the strange thing is that the values read from form can be displayed correctly if they are encoded
However, it is not possible to directly assign a Chinese value.
The resin platform is very good, ditto.
6 Chinese is displayed correctly after assigning a Chinese value to the variable.
For example, the following procedure:
Also in jswdk1.0.1, the above representation has no problem in jdk1.2.2, but cannot be displayed in jdk1.3.
Resin platform is very good, ditto, after testing, only need to make up in the
It can display Chinese correctly without the need.
This is the end of the article on "what are the common countermeasures for Chinese processing in jsp". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.