You are in the Quick tips & recommended category.

Character Encoding mismatch!

Ever got this message when you try and validate a webpage?

Character Encoding mismatch!

It’s a simple fix - It just means your global server setting for the character encoding on your web server is set to something different in your pages META or XML declaration.
Note: the 3 places the charset is defined is in the

  • HTTP header
  • ?xml…
  • meta …


Before the page is loaded your server sets the HTTP header with the servers specified character encoding settings. If you have coded a different charset in the HTML, then you will get this validation conflict. In this case the HTTP header information has the highest priority.

What should I do?

Ideally for servers only hosting one site (char sets are globally used) you should make sure your server settings are correct and let the HTTP headers do the work. However if you remove the declaration from the HTML page itself you could run in to problems with people saving pages that can be run from anywhere a CD or PC.

So…You should declare the charset in the HTTP headers and the document itself.

This is a very good read that explains it all with more information on server settings and how to declare the character encoding:
http://www.w3.org/International/tutorials/tutorial-char-enc/

Posted in Quick tips & recommended on March 1st, 2006 - One comment

Tags: , ,

One comment to “Character Encoding mismatch!”

  1. tobto Says... January 4th, 2009 at 11:58 pm

    thanks for the link to w3 article! My site has ‘mismatch’ & I didn’t get what to do, as that can be mismatch in db, html+db, ..

Join the conversation here...

You can use these html tags when making a comment:
<a href="" title=""> <abbr title=""> <acronym title=""> <strong> <blockquote cite=""> <code> <em> <i> <strike>

Back to the top