Problem passing hebrew letters when using HttpWebRequest

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Julia

    Problem passing hebrew letters when using HttpWebRequest


    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.Cre ate(url);

    objRequest.Meth od = "POST";

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

    objRequest.Cont entLength = data.Length;

    objRequest.Send Chunked=true;

    objRequest.Tran sferEncoding="U TF-8"; //Added this lately to check,but still
    does not work

    objRequest.Cont entType = "applicatio n/x-www-form-urlencoded";


    try

    {

    System.IO.Strea m stream=objReque st.GetRequestSt ream();

    stream.Write(da ta,0,data.Lengt h);

    stream.Close();

    }

    :

    :

    Thanks in advance/


  • Lee Jackson

    #2
    Re: Problem passing hebrew letters when using HttpWebRequest

    On Sun, 10 Apr 2005 10:40:10 +0200, "Julia" <codewizard@012 .net.il>
    wrote:
    [color=blue]
    >
    >Hi,
    >I am calling an ASP page from a NET application,and it seems that the hebrew
    >characters are being lost[/color]
    <snip>

    Sounds familiar...Try using Encoding.Defaul t rather than UTF8?


    Comment

    Working...