From: Shawn K. <sha...@ea...> - 2006-01-26 00:57:59
|
I don't think it follows that it is true in an xml document type declaration as well. Is the document type declaration used for other purposes such as validation? S -----Original Message----- From: tcl...@li... [mailto:tcl...@li...]On Behalf Of Alexios Zavras Sent: Wednesday, January 25, 2006 7:55 AM To: David Gravereaux Cc: tcl...@li... Subject: Re: [Tclhttpd-users] question on charsets Wojciech Kocjan wrote [edited]: > Dnia 25-01-2006 o 13:05:40 David Gravereaux <dav...@po...> napisa?: > >What happens when the server sets > > "Content-Type: text/html; charset=XXX" > >in the headers and the page contains: > > <meta http-equiv="Content-Type" content="text/html; charset=YYY"> > >Does the <meta> win or is it done twice, once for the transmission, and > >second at html parser level? > > From what I know http wins, meta is chosen when http does not specify it. > But I'm not sure if it's standarized in any way so that you can actually > rely on this. That's correct -- and it *is* standardized. From section 5.2.2 of the html spec: ---------------------------------------------------------------------- To sum up, conforming user agents must observe the following priorities when determining a document's character encoding (from highest priority to lowest): - An HTTP "charset" parameter in a "Content-Type" field. - A META declaration with "http-equiv" set to "Content-Type" and a value set for "charset". - The charset attribute set on an element that designates an external resource. ---------------------------------------------------------------------- http://www.w3.org/TR/REC-html40/charset.html#doc-char-set -- -- zvr -- -- +---------------------------+ Alexios Zavras (-zvr-) | H eytyxia den exei enoxes | zv...@po... +-----------------------zvr-+ ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ TclHttpd-users mailing list Tcl...@li... https://lists.sourceforge.net/lists/listinfo/tclhttpd-users |