Home > Net >  How to transfer the ISO - 8859-1 in Chinese
How to transfer the ISO - 8859-1 in Chinese

Time:04-21

File information, found that Chinese name of the file, will appear garbled,
Find the CharacterSet _httpWebResponse is ISO - 8859-1 ,
Chinese have become garbled, don't know how to convert the utf-8 or GB2312


 
HttpWebRequest _httpWebRequest=(HttpWebRequest) HttpWebRequest. Create (Url);
_httpWebRequest. Headers. The Add (Translate: "f");
_httpWebRequest. Credentials=CredentialCache. DefaultCredentials;
_httpWebRequest. Method="PROPFIND";
_httpWebRequest. Headers. The Add (" the Depth: infinity ");
HttpWebResponse _httpWebResponse=(HttpWebResponse) _httpWebRequest. The method GetResponse ();
StreamReader _streamReader=new StreamReader (_httpWebResponse GetResponseStream (), Encoding, GetEncoding (" utf-8 "));

  •  Tags:  
  • C#
  • Related