Previous Message
Next Message

Re: [css-d] charsets

Sent by Andrew Clover on 26 January 2002 23:11

Merlin Emrys [EMAIL-REMOVED]> wrote:

> Although this may be a bit off topic, which of these three metatags for 
> character sets is preferable, and why?

If there are no characters in your document in the range 128-255, it
doesn't matter, you can leave the charset info <meta> stuff out.
(The validator may give a warning, but it's not an error and you're free
to disregard it.)

Using only the us-ascii characters (32-127), the HTML named character
entity references, and Unicode character entity references allows the
document to be the same in any charset which is a superset of us-ascii,
including UTF-8, Latin-1 and Windows codepage 1252. Browsers have to assume
the character set is us-ascii-based to begin with, or they won't be able
to read the <meta> tag!

If you *have* used top-bit-set characters, either directly or as
&#128;-&#255;, obviously the charset must match whatever charset the
document was authored in.

Of course the best solution is to configure your server to send the charset
information in the real Content-Type header, eliminating the need for any
of this messy <meta http-equiv> business.

Oh yeah, you're right, it *is* off-topic. Join more mailing lists! They're
great! :-)

Andrew Clover
Previous Message
Next Message

Message thread: