Weird characters instead of latin!!

Well I’m moving from a home server to a virtual dedicated server.

It’s been hours of configurations and moving databases, files and stuff but I’m almost done. Almost all my test sites are up and running. A couple of minutes ago I uploaded a site that uses a lot of latin characters like ñ and accents. I wasn’t worried because I had my meta tags ‘properly’ set.

To my surprise once the site was up and I opened the URL it was showing weird characters instead of the latin characters!!!

Why?! My meta tags are correct! What could be wrong?

So I went back and started reviewing the web server conf file… I remembered that there was a conf variable I had to set for my metas to work… finally I got to this lines:

# Specify a default charset for all content served; this enables
# interpretation of all content as UTF-8 by default.  To use the
# default browser choice (ISO-8859-1), or to allow the META tags
# in HTML content to override this choice, comment out this
# directive:
AddDefaultCharset UTF-8
Ok so this is the conf variable I was searching. As always I didn’t read the commented words and put ISO-8859-1 instead of UTF-8. Some sites were OK but others went ahead with the weird characters!!!
I went back to editing the conf file but this time I took the time to read the comment. BINGO!
If this variable is set then the server will overwrite the meta define value of my web page which in this case was:
meta http-equiv=”Content-Typecontent=”text/html; charset=ISO-8859-1
So what I did was comment that line out and now my web server does check for the proper meta.


Comments are closed.