tags:

views:

44

answers:

1

I am trying to display the real value of ¼ and ”, but the browser is displaying it as ? (question mark) at a area where AJAX is enabled. While at a different browser locations it displays ¼”.

I want to display 1" but it getting displayed as 1â€. Please advise.

+1  A: 

I would guess you're doing something like fetching HTML from a second page and writing it to innerHTML.

Make sure that all your HTML is saved in the UTF-8 encoding. XMLHttpRequest.responseText will decode content from UTF-8, unless the response contains a Content-Type: ...;charset=something-else header. (A <meta> element is not good enough as XMLHttpRequest doesn't parse HTML to get the meta out; it has to be a proper HTTP header.)

bobince