XHTML Validation by w3c

T

Trevor L.

When I validate xhtml by http://validator.w3.org/ I get this message

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.

A typical header reads
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- index_main.html -->
<head>
<title>Index Main</title>
<meta name="Author" content="Trevor Lawrence"/>
<meta http-equiv="Content-Language" content="en-au"/>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>


I can't see anywhere that I have specified encoding of utf-8

I used to have this line at the top of my page, before the <!DOCTYPE >
<?xml version="1.0" encoding="UTF-8"?>
but Murray said that this causes IE6 to enter quirks mode.

Since removing it I found that IE6 does in fact behave differently - some
fonts that I specified as reasonably small are now displaying as specified,
whereas before they were much larger.

Is there some way I can get the best of both worlds?
I want IE6 to behave correctly, and the code to validate as iso-8869-1.
(In one case I had an accented e, which failed the validator, so I had to
change it a plain e)
 
R

Ronx

The HTTP header is supplied by your webserver - the headers received
for your home page are:
-----------
Response Headers - http://tandcl.homemail.com.au/

Date: Wed, 11 Jan 2006 12:10:39 GMT
Server: Apache/1.3.31 (Debian GNU/Linux)
Vary: Host
Last-Modified: Wed, 11 Jan 2006 03:52:31 GMT
Etag: "2ac6b8-590-43c480ff"
Accept-Ranges: bytes
Content-Length: 1424
Content-Type: text/html; charset=UTF-8

200 OK
 
R

Ronx

I want ........ the code to validate as iso-8869-1.
(In one case I had an accented e, which failed the validator, so I
had to change it a plain e)

The only way to do that is to get your ask to remove the UTF-8 charset
from the HTTP headers sent by the server.
Alternatively, use character/numeric references for symbols, and not
ASCII codes.
See www.w3schools.com//tags/ref_entities.asp for a list.
 
T

Trevor L.

Ronx said:
The only way to do that is to get your ask to remove the UTF-8 charset
from the HTTP headers sent by the server.
Alternatively, use character/numeric references for symbols, and not
ASCII codes.
See www.w3schools.com//tags/ref_entities.asp for a list.

Thanks for the info. in this and your previous response.

So you are saying that this tag has no effect
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
Therefore, I may as well delete it ?

I am not quite sure what you mean by:
"Alternatively, use character/numeric references for symbols, and not ASCII
codes."

Should I code
John le Carre (e having an acute)
as John le Carr&eacute;
or John le Carré ?
 
M

Murray

So you are saying that this tag has no effect
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
Therefore, I may as well delete it ?

Definitely do not.
as John le Carr&eacute;
or John le Carré ?

Yes. Either. That's exactly what he's saying.
 
T

Trevor L.

Murray said:
Definitely do not.
OK.


Yes. Either. That's exactly what he's saying.

Thanks, Murray
I was a little confused when Ron said *not* ASCII code - I wasn't using
ASCII code, just typing in the text.
I suppose that is read as ASCII
:)) (big grin)
 
R

Ronx

as John le Carr&eacute;
or John le Carré ?

either will have the same effect. This format will display correctly
with UTF-8, Windows-1252 or iso-8869-1.
However, be warned that FP2003 has a bug which changes both forms to
an ASCII character when you reformat HTML in code view.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top