问题
Some HTML name entities are not rendering in IE8 and instead I can see the not rendered HTML entity! For example ş
or ı
.
I found a solution to use HTML number entities such as ş
instead of ş
.
I was wondering if anyone knows about the reason of this issue and if there is a way to see ş
or ı
or similar entities correctly in IE8?
Here is my code on jsfiddle: (If you copy this code to a HTML file, it will not render in IE8)
http://jsfiddle.net/7uBrd/
<HTML lang="TR">
<HEAD>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<TITLE>test</TITLE>
</HEAD>
<BODY>
<p>This is not working in IE8: afişler, eşyaları, kı </p>
<p> This is working: afi&;#351;ler, eşyaları, kı </p>
<p>This is Working as well: test test–</p>
</BODY>
</HTML>
回答1:
Browser support for named HTML entities has always been worse than support for numeric entities. After all, the number is the Unicode code point for the character while the name requires manual update of a lookup table in the browser's source code. Those entities you mention are just not supported by Internet Explorer as of version 8 (or even version 9, no idea about 10).
You already have a workaround but I recommend that you just switch to UTF-8 and avoid entities completely (save for &
and other reasonable exceptions).
回答2:
The HTML4 specification does not contain the scedil
entity.
http://www.w3.org/TR/html4/sgml/entities.html
However, the HTML5 specification does. http://www.w3.org/TR/2011/WD-html5-20110113/named-character-references.html
来源:https://stackoverflow.com/questions/15207604/ie8-is-not-rendering-some-of-the-html-name-entities