[thelist] Character Encoding Mismatch
.jeff
jeff at members.evolt.org
Sat Oct 12 20:02:00 CDT 2002
rudy,
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: rudy
>
> > CFMX outputs utf-8 by default
>
> nice to know -- what about earlier versions?
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
not that i can tell.
the real difference is in the content-type header. from a cf5.0 site:
cmd> GET / HTTP/1.0
cmd> Host: www.evolt.org
cmd>
text/html => document.htm
RequestDone Error = 0
StatusCode = 200
Received 32166 bytes
hdr>HTTP/1.1 200 OK
hdr>Date: Sun, 13 Oct 2002 00:59:18 GMT
hdr>Server: Apache/1.3.26 (Unix)
hdr>Page-Completion-Status: Normal
hdr>Set-Cookie: CFID=2285061; expires=Sun, 27-Sep-2037 00:00:00 GMT; path=/;
hdr>Set-Cookie: CFTOKEN=14339979; expires=Sun, 27-Sep-2037 00:00:00 GMT; path=/;
hdr>Connection: close
hdr>Content-Type: text/html
from a cfmx site:
cmd> GET / HTTP/1.0
cmd> Host: hb.jeffhowden.com
cmd>
text/html; charset=utf-8 => document.htm
RequestDone Error = 0
StatusCode = 200
Received 4825 bytes
hdr>HTTP/1.1 200 OK
hdr>Server: Microsoft-IIS/5.0
hdr>Date: Sun, 13 Oct 2002 00:49:04 GMT
hdr>Content-Language: en-US
hdr>Content-Type: text/html; charset=UTF-8
there are two things noticaly different. one is the addition of the content-language header. the second is the addition of the charset information in the content-type header.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> > <cfcontent type="text/html; charset=ISO-8859-1">
> >
> > then you can leave your meta tag alone.
>
> i don't get it
>
> does the cfcontent create a meta tag? or some kind
> of http header?
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
http header
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> if so, it seems kind of superfluous to code a meta tag
> that says the same thing
>
> however, please note this is an important question,
> because the charset is mandatory for w3c validation
>
> if i code one, and use cfcontent, will i get two?
>
> (yeah, i know i can test this myself, but maybe you can
> save me the agro)
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
well, you really should have both. some useragents will use the one in the headers while others will use whatever it finds in <meta> tags. but, and here's the rub, they gotta be the same to make the validator not chirp at ya.
.jeff
http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/
More information about the thelist
mailing list