3

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&scedil;ler, e&scedil;yalar&inodot;, k&inodot; </p>
  <p> This is working: afi&;#351;ler, e&#351;yalar&#305;, k&#305; </p>    
  <p>This is Working as well: test&nbsp;test&ndash;</p>
 </BODY>
</HTML>
Carmijoon
  • 477
  • 5
  • 11

2 Answers2

6

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 &amp; and other reasonable exceptions).

Álvaro González
  • 142,137
  • 41
  • 261
  • 360
  • 3
    These (almost useless) character references are supported in IE 10 (even in Quirks Mode, surprisingly). The HTML5 term is “character reference”, since HTML5 lacks the “entity” concept (and things like `&scedil;` didn’t exist in HTML before HTML5). The use of numeric character references is a solution rather than a workaround, and using UTF-8, when possible, is an even better solution. – Jukka K. Korpela Mar 04 '13 at 18:46
  • Thanks a lot guys for your answers, I do not have enough reputation to vote up, but I will back and vote up as soon as I get permission. – Carmijoon Mar 06 '13 at 01:22
3

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

hank
  • 3,748
  • 1
  • 24
  • 37
  • Thanks for your help :), as I mentioned above I do not have enough reputation yet to vote up. Thanks again – Carmijoon Mar 06 '13 at 01:25