該網站是用Windows-1255編碼的希伯來語版本。 使用Firefox的馴數據擴展,我看到帖子的參數之一是:
+++++++++%E4%FA%E7%E1%F8 +++++++++
使用this表我把它翻譯爲希伯來語:在HttpWebRequest上發佈非英文數據
+++++++++התחבר+++++++++
現在,我想將它作爲發送POST數據:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
string param =;// What should I set here? should i type in hebrew? should i conver it to hex?
//Should I type +++++++++%E4%FA%E7%E1%F8+++++++++ or maybe %E4%FA%E7%E1%F8?
string postData = string.Format({0}={1}",param,value);
byte[] byteArray = Encoding.UTF8.GetBytes(postData); //what encoding to use?
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = byteArray.Length;
Stream dataStream = request.GetRequestStream();
dataStream.Write(byteArray, 0, byteArray.Length);
我仍然困惑,在我的情況PARAM應該是:PARAM = 「%E4%FA%E7%E1%F8」 我應該使用ASCII而不是UTF8? – jullin 2010-12-22 13:10:42