Re: First stupid post of the year. [SOLVED]

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

 



At 11:04 PM +0100 1/5/08, Nisse Engström wrote:

   The page encoding is determined by the HTTP
`Content-Type:´ header. Period. A <meta> element
may provide hints to a browser if the HTTP header
is missing (eg. when saving a page to disc). In the
presence of a `Content-Type:´ header, the <meta>
element should be completely ignored.

So, if one uses this --

<?php header('Content-Type: text/css; charset=UTF-8'); ?>

-- preceding everything else on a web page, and also saves that page using UTF-8 encoding, then it's certain that the page will be recognized as UTF-8 across all modern browsers?


 > And lastly, what's the best encoding to set your
 browser? I have clients who are all over the
 place with special windoze characters that appear
 like garbage in my browser.

   Set it to detect automatically, with a preference
for cp1252 (or windows-1252) which covers a lot of
western characters. cp1252 also has the nice property
of being compatible with ISO-8859-1, except that it
has some extra real characters where 8859-1 has control
characters.

Interesting that my browser (Safari) doesn't even offer that choice, at least under that name. It does offer ISO Latin, Mac OS Roman, UTF-8, and 34 other language-specific text encodings -- but not 1252.

Besides, while I know that the majority of Internet users are windows challenged, I can't bring myself to follow -- I'll stick with UTF-8. :-)

Side note: Hopefully some day soon, M$ will stop treating the global user as a second-class-citizen in using PUNYCODE instead of displaying characters (code-points) as intended by the IDNS. I think the "homographic attack" concern is basically a red herring that could be easily solved (if it was really a problem) by simply color coding mixed charset urls. Would work for me.

I find it interesting that Safari doesn't show PUNYCODE and the majority of Apple's profits came from "other than US" sources last year -- perhaps this is a result of end-user sensitivity. It's nice to know that when everything else fails, money always seems to work. :-)

In any event, thank again for your thoughts.

Cheers,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
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