Forum Moderators: mack

Message Too Old, No Replies

Is this necessary in the header anymore?

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

         

Lazy_Cat

8:40 pm on Apr 17, 2004 (gmt 0)

10+ Year Member


Do the spiders care about:

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

Thanks oh wise ones.

bird

8:59 pm on Apr 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do the spiders care

They better do!

How do you think Google can display the titles of chinese and russian sites correctly in the SERPs?

There's an alternative, though. If your server includes the same information on the HTTP protocol level, then you can omit that meta tag. In practise I'd recomment to put it there anyway, because someone storing the file on their disk for later viewing won't have the protocol data available anymore then.

D_Blackwell

11:19 pm on Apr 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do you validate your code? I don't know if this is true for all, but the W3C validator requires declaration of character encoding.

As example:

I was not able to extract a character encoding labeling from any of the valid sources for such information. Without encoding information it is impossible to validate the document. The sources I tried are:

* The HTTP Content-Type field.
* The XML Declaration.
* The HTML "META" element.

And I even tried to autodetect it using the algorithm defined in Appendix F of the XML 1.0 Recommendation.

SlowMove

11:26 pm on Apr 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I was not able to extract a character encoding labeling from any of the valid sources for such information. Without encoding information it is impossible to validate the document.

Try to validate your page at validator.w3.org and you might just see the above message.

encyclo

12:13 am on Apr 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's obligatory to define your character set - but not necessarily with a meta tag. You can also define it in the HTTP headers which are sent before the page.

If you are running Apache, and you have a unilingual site (or languages which share the same charset), you can add the following to the httpd.conf or .htaccess:

AddDefaultCharset ISO-8859-1

Another way is if you are using a scripting language to generate your pages, for example with PHP:

<?php header('Content-Type: text/html; charset=ISO-8859-1');?>

Lazy_Cat

3:18 am on Apr 18, 2004 (gmt 0)

10+ Year Member



Got it.
Thanks everybody.