I am having a little trouble with characters being transcoded correctly when received through AJAX.
I have a simple PHP script that when executed outputs the character "—" (an m-dash). When I visit the page directly, it outputs the character fine, but when it is loaded through AJAX, a "?" (as in unknown character) appears in its place. This occurs in all browsers tested so far (FF, Opera, and Safari).
The only difference I can think of between the two requests are the headers. The response headers are the same, but the request headers are different.
Request headers for direct page load:
Request headers for AJAX page load:
Response headers (same on both):
Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Date:Sat, 03 Jul 2010 05:38:41 GMT
Expires:Thu, 19 Nov 1981 08:52:00 GMT
Server:Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8l DAV/2 PHP/5.3.1
What could be causing this problem, and how could it be fixed?