I have a page http://199.193.248.80/test/test.php that contains the « character.
But when I read this page with js on http://199.193.248.80/test/test.html, the character turns into �
Both pages are using Charset Windows-1252 so I have no idea why it works on one page but not the other. What needs to be done to fix this?
This is probably because PHP sets a different character set (when serving the
.php) in the headers than Apache does (when serving the.html). Browsers use the character set that’s mentioned in the response headers; it overrides the<meta>tags in fact.By default PHP chooses
iso-8859-1I believe, but you can override the character set in PHP by using:Or change the
php.inifor a global change.See also: