locked
IIS server and Javascript : (ajax GET request) weird characters in browsers (IE, Firefox etc) RRS feed

  • General discussion

  • I am using IIS server, and writing few test pages, with just JavaScript.

    xmlhttp.open("GET", encodeURIComponent(foo), true);
        xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded;charset=utf-8");
        xmlhttp.send(); 

    This xmlHttp request gets the content of a text file (saved in unicode format). While I am able to get the content of file, but some characters like ' look weird with question mark tag.

    In response header I could see:

    Content Type: application/x-javascript

    The page in which, this data in getting updated has meta tag as follows :

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

    I am running it on my local machine : 127.0.0.1:9090/

    Thanks for time.

    • Changed type Justin Gu Tuesday, October 7, 2014 4:18 PM
    Tuesday, September 23, 2014 6:13 AM

All replies

  • Hi Ajay,

    Based on your description, this issue seems to be related to JavaScript in IIS server. I suggest that you would post your question in IIS Forum. I believe we will get a better assistance there.

    Best regards,

    Justin Gu

    Tuesday, September 23, 2014 9:19 AM