P
Piotrekk
Hi.
I receive XMLcontent codded in ISO-8859-1.
XML file contains Polish character set so that i need to notice somehow
when they are coming. My program cuts this characters and replaces them
with "". I have english copy of windows.
What am i dooing wrong here.
Any help would be appreciated
Thanks
try
{
HttpWebRequest request = null;
HttpWebResponse response = null;
request =
(HttpWebRequest)WebRequest.Create(address);
request.Headers.Clear();
request.ProtocolVersion = HttpVersion.Version11;
response = (HttpWebResponse)request.GetResponse();
string header2 = response.Headers.Get("Auth");
if (header2 != "true") throw MyException;
Stream responseStream =
response.GetResponseStream();
StreamReader streamReader = new
StreamReader(responseStream);
StreamWriter sw = new StreamWriter("~temp.xml");
string temp = null;
while (true)
{
temp = streamReader.ReadLine();
if (temp == null) break;
//HERE TEMP ALREADY HAS "" INSTEAD OF SPECIAL
CHARACTERS
sw.Write(temp);
}
response.Close();
sw.Close();
}
I receive XMLcontent codded in ISO-8859-1.
XML file contains Polish character set so that i need to notice somehow
when they are coming. My program cuts this characters and replaces them
with "". I have english copy of windows.
What am i dooing wrong here.
Any help would be appreciated
Thanks
try
{
HttpWebRequest request = null;
HttpWebResponse response = null;
request =
(HttpWebRequest)WebRequest.Create(address);
request.Headers.Clear();
request.ProtocolVersion = HttpVersion.Version11;
response = (HttpWebResponse)request.GetResponse();
string header2 = response.Headers.Get("Auth");
if (header2 != "true") throw MyException;
Stream responseStream =
response.GetResponseStream();
StreamReader streamReader = new
StreamReader(responseStream);
StreamWriter sw = new StreamWriter("~temp.xml");
string temp = null;
while (true)
{
temp = streamReader.ReadLine();
if (temp == null) break;
//HERE TEMP ALREADY HAS "" INSTEAD OF SPECIAL
CHARACTERS
sw.Write(temp);
}
response.Close();
sw.Close();
}