Reputation: 47945
I convert some string in UTF8, and I watch it on browser with UTF-8 or ISO-8859-1. The render is the same. Have they some equals entities?
For example ³
(which is ³
) is displayed the same on both codify.
Upvotes: 0
Views: 276
Reputation: 33163
HTML character references like ³
are instructions for the browser to display certain characters. The browser displays them using the character set currently in use.
If you have a HTML document that contains
2³ = 8
the browser displays a ³
character as instructed by the character reference. ³
itself isn't UTF8 or ISO-8859-1; &
, s
, u
, p
, 3
and ;
are all just normal characters present in both encodings. The entire point of HTML character references is that you can use them without caring what the document's actual encoding is.
If you don't use character references but the actual character instead:
2³ = 8
Now the character set becomes important: if you save the file as UTF-8 and the browser tries to render it using ISO-8859-1, you'll see a mangled character instead of ³
, and vice versa.
Upvotes: 2