Declare character encoding in HTML

5 07 2010

Writing documents in english, german and norwegian leaves you with a mess of different character encodings in documents and also webpages.

Just wrote a plain HTML page with norwegian special characters and Firefox, did not show the characters correctly, so I had to find out how to specify that the encoding of the norwegian æøå’s is UTF-8.

Fortunately there is a good explanation on the W3C Blog.

The code to specify the encoding is

http-equiv="Content-Type" content="text/html; charset=UTF-8"

I have no illusion about some browser (IE?) getting it wrong anyway. At least Firefox seems to comply…

Advertisements

Actions

Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: