Does IE8 ignore Content-Type's charset in header?
I have a very simple PHP file. I had set the charset using PHP's header() function as below...
header('Content-Type: text/html; charset=utf8');
Nothing was overwriting it, as I inspected the headers and it was coming through fine.
I am using a Unicode arrow (→) on my page. It is directly on the page, and not processed by any string manipulation functions.
It worked fine on Firefox and Safari, but in IE8 it came out as a mess (2 weird glyphs).
After some frustration, I added this to my head as well...
<meta http-equiv="Content-Type" content="text/html; charset=utf-8开发者_运维技巧">
...and it fixed it.
What is the issue? Does IE8 ignore the charset in the header? Doesn't the http-equiv mean that it should be treated exactly like a normal header?
Your HTTP header contains utf8, but your meta tag contains utf-8. I'm fairly sure the latter is the correct name. Check if putting utf-8 in the HTTP header helps.
加载中,请稍侯......
精彩评论