1

I am using server side code to get all parameters from the users, using the name parameter as follows,

string name = HttpContext.Current.Request.QueryString["name"];

I have to pass name in Hebrew as well. When I pass Hebrew in chrome and Firefox all is good but,

in IE the Hebrew sequence is coming as ?????

Is there any way to fix this on the server side?

Thanks in Advance!

Dominic Zukiewicz
  • 8,258
  • 8
  • 43
  • 61

2 Answers2

0

I think that you should use HttpUtility.ParseQueryString Method.

var qsParsed= HttpUtility.ParseQueryString("phone=05099999&name=%3f%3f%3f%3f%3f&carNo=555555");
var name= qsParsed["name"];

The ParseQueryString method uses UTF8 format to parse the query string In the returned NameValueCollection, URL-encoded characters are decoded and multiple occurrences of the same query string parameter are listed as a single entry with a comma separating each value.

faby
  • 7,394
  • 3
  • 27
  • 44
0

After much research, I figured the problem.

It was on the client side, my ajax was as follows:

$.ajax({
            type: "GET",
            url: "/inc/Handlers/CarSale/CallMeHandler.ashx?phone="
                + data.prefix + data.phone + "&name=" + data.name +
                "&carNo=" + callme.siblings("input").val(),
            //data: data
        })

in order to do manual parse I needed to add encodeURIComponent(data.name)... So IE will do the correct parse.

thanks all in advance you are awesome for helping!