Forum Moderators: open

Message Too Old, No Replies

Character Encoding mismatch!

Character Encoding mismatch!

         

bulkin

7:25 pm on Jul 23, 2005 (gmt 0)

10+ Year Member



Hi guys,

I just made one of my sites validate (finally!) but I still get the character encoding mismatch error... can you please help:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My title</title>
<META NAME="description" content="my description">
<META NAME="keywords" content="my keywords here">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="css/style.css">

thanks much!

:)
val

encyclo

12:19 am on Jul 24, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What's the exact validator error you are getting, val? A "Tentatively valid" warning or something else?

bulkin

4:51 am on Jul 24, 2005 (gmt 0)

10+ Year Member



hey encyclo,

i get this errir: "Character Encoding mismatch!The character encoding specified in the HTTP header (utf-8) is different from the value in the <meta> element (iso-8859-1). I will use the value from the HTTP header (utf-8) for this validation."

thanks much :)
v

g1smd

7:25 am on Jul 24, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



This means that the global server setting is set to UTF-8 and that it is served in the HTTP header even before the HTML page itself is delivered.

The easiest solution is to save all your pages as UTF-8 too, and delete the meta element from your pages.

Use WebBug to confirm the behaviour of the server.

encyclo

4:32 pm on Jul 24, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



g1smd is right about the HTTP header (sent before the page is served) being the cause of the problem. Are you using a dedicated server? If so, you can remove the default charset and just specify it per page - this is useful if you have content with different character encodings. In Apache, you can comment out the
AddDefaultCharset
line in httpd.conf, or set it to
iso-8859-1
or
off
. If you are on a shared server, contact your hosting company: this should not be set on a shared hosting setup.

Finally, if you are using any server-side scripting (PHP, ASP), the UTF-8 header could have been set there.

bulkin

7:57 pm on Jul 24, 2005 (gmt 0)

10+ Year Member



thanks guys! i am using ASP and i'll check header setting there. :)

g1smd

10:24 am on Jul 27, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



What did you find?