Simple request, simple response, but garbled generated
Why?
Garbled reason is very simple, but it is the code table with the wrong, such as the transmission is BIG5 characters, receive the use of Utf-8, or utf-8 encoding, but with GB2312 decoding.
OK, let's make sure that the garbled in the request process
Then I send the past is garbled?
Open the Test.txt under the c:/tmp/
What is this code, guess?
It seems that the client is right, and correctly to the server side, it should be asp.net got the wrong code, HttpRequest class to find there is no relevant encoding related properties
Look at web.config.
Test it, change it into utf-8, look at it.
The reason is successfully found, it seems that the client-side utf-8, and then the server Big5 receive problems
But this project can not solve this problem, because this old project ran for a long time, change here may affect the previous other programs, then change the client, set request properties for Utf-8, let asp.net not confused
Modify AJAX request code, set CharSet property
Problem to solve, but recently also in vs2005 use jquery, no garbled, may be vs2005 has been default for Utf-8 (have time to find out where is the default, or the TX tell)
vs.net2003 default is the code of the native operating system, such as big5,gb2312, so the garbled problem often occurs.
Also, share a simple text file with the garbled view method.
For some not at the end of txt text file (such as Aspx,cs), you can change the suffix to txt, and then open IE to see, otherwise IE will not recognize, direct download
Too many pictures, please slow the speed of TX Forgive ~ ~