Problem passing hebrew letters when using HttpWebRequest

J

Julia

Hi,
I am calling an ASP page from a NET application,and it seems that the hebrew
characters are being lost

here is my code:

string url....

string strPost....




HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(url);

objRequest.Method = "POST";

byte[] data = Encoding.UTF8.GetBytes(strPost);

objRequest.ContentLength = data.Length;

objRequest.SendChunked=true;

objRequest.TransferEncoding="UTF-8"; //Added this lately to check,but still
does not work

objRequest.ContentType = "application/x-www-form-urlencoded";


try

{

System.IO.Stream stream=objRequest.GetRequestStream();

stream.Write(data,0,data.Length);

stream.Close();

}

:

:

Thanks in advance/
 
L

Lee Jackson

Hi,
I am calling an ASP page from a NET application,and it seems that the hebrew
characters are being lost
<snip>

Sounds familiar...Try using Encoding.Default rather than UTF8?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top