When I was just doing this, I found that the whole website uses gb2312 encoding. When I used the uploadify upload control to upload Chinese characters, I was able to partially succeed in IE, and FF and chrome completely failed. I found the reason for one day, the results showed that it was a page encoding problem. On the internet, the flash of uploadify adopts the UTF-8 encoding method, so I tried to change the upload page to UTF-8 on the Internet.CodeNo, no. The last piece of code is a miraculous success. If you don't want to talk about it, go directly to the Code:
Add the following sentence to uploadhandler. ashx, and you do not need to set anything in config,
Public void processrequest (httpcontext context)
{
Context. Request. contentencoding = encoding. getencoding ("UTF-8 ");
Context. response. contentencoding = encoding. getencoding ("UTF-8 ");
Context. response. charset = "UTF-8 ";
Okay. The figure is as follows:
It won't be garbled, huh, huh.