无法从xml响应中读取C#中的泰米尔字符(கோயம்புத்தூர்)

时间:2018-10-04 14:16:43

标签: c# xml http

我正在使用C#Windows应用程序以XML格式从提示中获取响应。当数据像符号和特殊字符时,我可以获得详细信息。但是我无法获得其他语言的数据,例如泰米尔语,印地语等。那么我该如何获取它呢??

预期O / P:பாண்டியன்450,கோயம்புத்தூர்

收到的O / P:????????? 450,??????????????

HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(string.Format("http://localhost:{0}", "9000"));
httpWebRequest.Method = "POST";
httpWebRequest.ContentType = "application/x-www-form-urlencoded";

StreamWriter streamWriter = new StreamWriter(httpWebRequest.GetRequestStream());

streamWriter.Write(xml);
streamWriter.Close();

HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
Stream dataStream = httpWebResponse.GetResponseStream();
using (StreamReader reader = new StreamReader(dataStream, Encoding.Default, true))
{
    responsefromServer = reader.ReadToEnd();
}

0 个答案:

没有答案