In xml applications, some URL information is often stored as xml data. the URL parameter may contain Chinese characters. When you use dom to parse xml data, you can encode Chinese characters. In xml applications, some URL information is often stored as xml data. the URL parameter may contain Chinese characters. When you use dom to parse xml data, you can encode Chinese characters.
However, if only xslt is used to display xml data (data. xml + data. xsl). the encoding error is found in the URL at this time. even if the encoding type is specified (encoding = "gb2312"), the same problem still occurs.
Test results show that the cache mechanism of IE is incorrect. IE still sets the MIME content type of the new page (URL linked) to text/xml by default.
Solution:
1. specify the output document type as xml document (example: data. xsl)
2. Open in a new window, add properties to the join, and specify the target window as another window (example: data2.xsl)
_ Blank
Examples:/*** data. xml ***/
Http://www.google.com/search? Q = </url>
Xml data
Http://www1.baidu.com/baidu? Word = </url>
Xml data
Http://www.google.com/search? Q = </url>
Extreme Programming (xp)
Http://www1.baidu.com/baidu? Word = </url>
Extreme Programming (xp)
/*** Data. xsl ***/
/*** Data2.xsl ***/
_ Blank
The above is a detailed explanation of the URL encoding problem that contains Chinese characters. For more information, see PHP Chinese website (www.php1.cn )!