In the jsp, the Chinese people to be terribly upset often garbled.
Common measures for Chinese processing, can often be seen in the main line is the following 2:
Or:
Virtual Small Dragon Pavilion is also mainly the above two kinds of methods were modified to become a 1.1 version.
A simple summary of the sample occurred in the Chinese and the following places:
1 with the Chinese in the url parameter can be directly read.
For example:
2 sql database relevant to the operation
Here the use of Access without problems.
3 to read HTML form submitted in the form of Chinese values
Need to be encoded in jswdk the more concise wording such as:
String name1 = new String (request.getParameter ("user_id"). GetBytes ("ISO8859_1"));
In addition, jdk1.3 support, do not join
In jdk1.2.2 below, even if the two kinds of methods used at the same time is also very unstable.
In the resin platform, the situation is better. As long as the first line of the page by adding:
Can correctly handle the Chinese.
If we add the code then it does not.
5 session included the Chinese
In jswdk, the strange thing is, if read from the form of encoded values can be displayed correctly;
However, given directly to Chinese values are not.
resin platform well, ibid.
6 for values of the variables assigned after the Chinese displayed correctly in Chinese.
For example, the following procedures:
Also jswdk1.0.1, above representation is not the problem in jdk1.2.2, but it can not be displayed under jdk1.3.
resin platform well, ibid, tested only in make up
Without the need to also be able to display Chinese correctly.
Experience:
jswdk may only be used for general development, stability and other issues may not be as commercial software.
As the jdk1.3 version many times better than those jdk1.2.2, and also better support for Chinese, so it should be used.
As a free commercial software, resin is not only fast, stable, and automatically compile, mistakes can be pointed out that the line can support the use of server-side javascript, etc., but at least I think that the support of the Chinese language well.
Of course, if you can not do anything with the right will show the Chinese what we expected.
Also, I believe in the unix / linux / solaris should under no such problem.
Recommended links:
"Dance like" Chinese EDITION
Development Catalogs
FLV to SWF
Storage Religion
Ultimate practicing four cents lets YOU easily got to the 99
Young PROFESSIONALS entering the workplace to learn the three key issues
In Section North soft, direct plug in for the "wings"!
Fireworks 4.0 Zhezhao Daquan ---- second class to create a bitmap Zhe Zhao
WMV to QT
BT brings benefits only to the minority Carrier BT is to pay
Printer Report
QT to WMV
China's environmental satellite data
Convert Text To Numbers
Thunder has more than 100 million users targeting NASDAQ
No comments:
Post a Comment