Re: Re: Internet Explorer doesn't display UTF-8 page using UTF-8 encoding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tedd wrote:
At 6:48 PM -0700 8/12/06, Rasmus Lerdorf wrote:
By the way, everyone should be setting a charset. If you don't set it, IE will look at the first 4k of the body of the page and take a wild guess.

-Rasmus

-Rasmus:

Ok, but why doesn't w3c use it?

http://validator.w3.org   (check source)

I'm not sure what to do re charset. I've been told by credible sources to "always use it" and "never use it" -- which is correct? Or, is this one of those "it depends" things?

W3C is all about standards. IE is all about not following standards. If you want your site to work in the real world you should always set a charset. If you set it in your response header there is no need to set it in each page, and if you look closely, you will see that this is what w3.org is doing:

9:55am shiny:~> telnet validator.w3.org 80
Trying 133.27.228.132...
Connected to validator.w3.org.
Escape character is '^]'.
HEAD / HTTP/1.0

HTTP/1.1 200 OK
Date: Sun, 13 Aug 2006 18:42:15 GMT
Server: Apache/2.0.54 (Debian GNU/Linux) mod_perl/1.999.21 Perl/v5.8.4
Accept-Ranges: bytes
Connection: close
Content-Type: text/html; charset=utf-8

-Rasmus

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux