我有这段代码:
private void HandleWebResponse(IAsyncResult asyncResult)
{
WebRequestState state = (WebRequestState)asyncResult.AsyncState;
HttpWebRequest request = state.Request;
string url = request.RequestUri.ToString();
state.Response = (HttpWebResponse)request.EndGetResponse(asyncResult);
string absolutePath = state.Response.ResponseUri.AbsolutePath;
if (state.Response != null)
{
StreamReader reader = new StreamReader(state.Response.GetResponseStream(),Encoding.GetEncoding("ISO-8859-1"));
StringBuilder sb = new StringBuilder();
while (!reader.EndOfStream)
sb.Append(reader.ReadLine());
...
我的网页编码为ISO-8859-2,但WP7不支持此编码。如何将此编码转换为另一种?或者你有提示如何绕过这个问题?每个建议都是如此。