tags:

views:

69

answers:

3

Declaring them as &xuml; etc. didn't work, just writing them as they are leads to display errors.

What to do?

+3  A: 

If your page is encoded as UTF-8, you should be able to use special characters directly (i.e. without converting them into their HTML entity counterparts) without problems. Note that if you declare the encoding in a content-type meta tag, you should put that tag to the very beginning of the head section.

Pekka
You should perhaps also qualify that this counts for *all* HTML code (that comes after the `Content-Type` meta declaration if none was sent in the HTTP header), not just special tags.
Konrad Rudolph
@Konrad good point, added.
Pekka
A: 

You should never have to use HTML entities for those characters, since they have no special meaning in HTML. Just make sure the character encoding of the text you're outputting matches your charset header.

Matti Virkkunen
+1  A: 

Use an encoding which can encode the characters. I'd recommend UTF-8, which is generally the preferred solution for western languages.

Keep in mind that HTTP headers have precedence over <meta http-equiv=...>, but you should set both to ensure using the correct encoding when loading the document from non-HTTP sources (eg when saving the file locally).

Christoph