The first solution to Asp.net page garbled:
<Globalization
Requestencoding = "gb2312"
Responseencoding = "gb2312"
/>
Asp.net page garbled second solution:
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
Third solution to Asp.net page garbled:
Specify the file name when downloading the file, The Chinese file name is garbled ?
Response. addheader ("content-disposition", "attachment; filename =" + httputility. urlencoding (filename. tostring ()));
Solution 4 for garbled Asp.net pages:
Why are the Chinese characters read from the file garbled?
System. Io. streamreader m_fs = system. Io. file. opentext (hfile_selectfile.value );
Change
System. Io. streamreader m_fs = new system. Io. streamreader (hfile_selectfile.value, system. Text. encoding. getencoding ("gb2312 "));
Solution 5 of Asp.net page garbled characters:
Solve the problem of Chinese garbled characters in query strings?
The query content is encoded by server. urlencode.
String url = "http: // localhost/test. aspx? A = "+ server. urlencode (" James ");
Solution
--> Server. urldecode ()