Coding configuration about ASP.NET

zhaozj2021-02-12  210

In the implementation of the BBS multi-change personality map, I met a question when using the ASP.NET web page dynamically generated this program, that is, when there is Chinese in querryString, there is always no way to display, and the numbers are not in English. problem. Later, I finally found the problem because of ASP.NET encoding. Open Web.config Seeing such a configuration item:

???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

??????????? RequestentEncoding = "UTF-8"

??????????? responseEncoding = "UTF-8"

?? />

This is the default configuration, and the value of RequestenCoding is changed to GB-2312, and the problem is solved.

转载请注明原文地址:https://www.9cbs.com/read-6937.html

New Post(0)