Re: DOCTYPE
- From: Jerry <Jerry@xxxxxxxxxx>
- Date: Thu, 28 Feb 2008 15:29:11 -0500
Dikkie Dik wrote:
Not entirely. The best way to send the character set is _outside_ the document itself. It is a strange that you should parse the character set used out of the encoded document. What about utf-16? or utf-32? Could you parse those character sets as easily out of a documented that is written in it? Off course not. And if you can, there is no reason to do so anymore.
So character sets are sent in a header. PHP supports this in two ways:
- set the default document type and character set in your PHP.ini,
- send a header your self with the header() function;
that's interesting, having never thought much about charsets. So if I were ever to need to publish a page that included unusual (non Latin-1) characters, I could specify the appropriate alternate encoding via php's header(), and then that particular page would show the unusual characters correctly. That seems obvious in retrospect.
I took a brief tour of the web now and see that some Chinese sites have their own charset (which is included in FF), but Korea and Thailand did not. Also, Denmark did not. They all used UTF-8. Is there any overriding principle that determines whether they use UTF-8 or not? Or is it just case by case?
.
- Follow-Ups:
- Re: DOCTYPE
- From: Dikkie Dik
- Re: DOCTYPE
- References:
- DOCTYPE
- From: Jerry
- Re: DOCTYPE
- From: Michael Fesser
- Re: DOCTYPE
- From: Jerry
- Re: DOCTYPE
- From: Jerry Stuckle
- Re: DOCTYPE
- From: Jerry
- Re: DOCTYPE
- From: Dikkie Dik
- DOCTYPE
- Prev by Date: Re: Paypal Payment Pro with certificate use
- Next by Date: Re: DOCTYPE
- Previous by thread: Re: DOCTYPE
- Next by thread: Re: DOCTYPE
- Index(es):