7

A site I'm working on is switching from ISO. If the HTML character set is set to UTF-8, do I still need to replace ©, é, , etc with the appropriate HTML entity?

Dirk Diggler
  • 863
  • 1
  • 10
  • 22
  • possible duplicate of [When Should One Use HTML Entities](http://stackoverflow.com/questions/436615/when-should-one-use-html-entities) – lulalala Jan 17 '14 at 01:30

3 Answers3

6

No, symbols like ©, é, , the German umlauts ä, ö, ü, ß and all the other stuff can be used just like any other character when using UTF-8.

But note that some things still have to be entities because they have a special meaning in HTML ( < and > for example, which should still be replaced with &gt; and &lt; if you want to use them in your text)

lulalala
  • 17,572
  • 15
  • 110
  • 169
oezi
  • 51,017
  • 10
  • 98
  • 115
  • 1
    Thanks. What about HTML emails? I assume I don't have the same control over character encoding there as I do on my own site, so should I use entities just to be safe? – Dirk Diggler Sep 13 '11 at 16:15
  • 2
    you can give a header to define a charset in an html-mail, too - but some (mostly older) mail-clients will ignore that. best way is, like you said, to use entities in html-mails just to be safe. – oezi Sep 13 '11 at 16:17
1

in short : No you don't, actually I would even advise not to use them anymore. A possible legacy usage would be in some html pages links and forms "gets", but even here usually we can deal without.

Flavien Volken
  • 19,196
  • 12
  • 100
  • 133
1

Depends also on how you generate / edit your content. If you have users editing files locally on Windows and what not, it may be safer to stick to entities after all.

tripleee
  • 175,061
  • 34
  • 275
  • 318