Which Character Encoding Should You Choose For Your Website?

January 27, 2007

For those who use WYSIWYG editors without bothering to “go underneath” to examine the actual HTML of your web-pages, character encoding is rarely an issue — usually you will go with the default encoding assigned by your editor.

For Microsoft FrontPage users it’s usually “Windows-1252″ encoding. Other encoding schemes include the popular “UTF-8″ and the “ISO 8859 series.”

An appropriate encoding META declaration is necessary in order for browsers to render your web-page content correctly and for search engines to read it accurately. The character encoding of an HTML document specifies the technical details of how the characters in the document character set should be represented when stored in a file on a server, transmitted over the internet or viewed in a browser.

Also, given that different languages around the world are based on widely varying “character sets,” it is therefore imperative that you declare an encoding scheme that not only matches the content of your web-pages but also encompasses the flexibility necessary for your pages to be read in the language(s) of your choice.

Typically, western languages which are Latin based will be rendered perfectly using the “ISO 8859-1″ encoding scheme. On the flipside, a multilingual site or one that mixes special symbols such as mathematical symbols with non-Latin based languages like Arabic, Chinese, Japanese and so on, will need an encoding declaration such as “UTF-8.” This blog is intended for an international readership, therefore “UTF-8″ is appropriate — The encoding META declaration at the HEAD of each page reads as follows: [code lang="php"]< meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />[/code]

By choosing an inappropriate encoding on a site intended for an international audience, you run the risk that some your content may not be readable to some of your website visitors.

Each encoding scheme has some drawbacks — Tommy Olsson looks into Character Encoding in greater detail, in his article titled: The Definitive Guide to Web Character Encoding — Great Read!

References:

Comments

Got something to say?

You must be logged in to post a comment.