Jump to content

Recommended Posts

Posted (edited)

Hello, I'm cleaning up, and inserting meta tags now. Question though!

 

 

Currently, this charset is in all my pages. Remember, I didn't originally build this site. What is this, what is it used for, and should I replace it with the version below? Thanks!

 

I'm used to seeing this one.

Edited by Eric
Posted

Just google charset=iso-8859-1 and you will get a wealth of information. In short, it's an old Latin character set used mostly by windows. The search results will go in greater details about it.

Posted (edited)

I can always count on you Eddie to inform me of Google. I did Google it prior to posting, and I did not get a wealth of information. About all I found was what you mentioned - a latin thing. I was hoping one of you guys could save me the hunt.

Edited by Eric
Posted

If your web site is going to be viewed internationally you need to use UTF-8. It is able to represent any character in the Unicode standard, yet is backwards compatible with ASCII.

Posted
Thanks guys! So the 8859-1 one is only for English? UTF-8 it is then, I just like to make an informed decision.

Incorrect. 8859-1 is also for various other languages such as French, German, Spanish and a host of others. That is why it's called Western European. It also includes regions like Australia, much of Africa and all of the Americas.

 

I can always count on you Eddie to inform me of Google.

:) Well, I wasn't trying to be smart-alec. I mean I sincerely thought you might have done so but sometimes you can't find the right answers because of the search query which is why I suggested googling charset=iso-8859-1.

  • 3 weeks later...
Posted

You can delete it.

 

It is a common misunderstanding that that is needed, it is not.

 

That bit there tells the browser what character set to use right? But that is decided early on, when your browser makes the request to the server it tells the server what it wants and can handle. By the time the browser reads that code, the mimetype has already set the character set. Try it, remove it and nothing will change.

 

That bit of code hurts nothing, it allows the browser to know what character set to use when it is no connected to a server. Either doing testing or saved to the PC by the user. But if a server is used, it is decided long before the browser even sees that code, so you can leave it off if you like.

Posted

It may make no difference to the browser but there's definitely a difference in the way validators check a page.

 

charset=iso-8859-1 allows ? and other unusual symbols but if you use the meta tag for utf-8 a validator will show and error for some of them and suggest that you use the full character code like £

Posted

Yes, validators fall into the category like pages saved to the desk top. They do not go over the server in the same form with MimeTypes as they are not displaying the site, just reading code.

 

Those issues will not happen on a server, so that code is not needed on the page, but does no harm either. You can tell the meta tag to use Mandarin Chinese... but if the MimeType is stating UTF-16 that is what is use dregardless of what you have in a meta tag after the decision is made.

  • 2 weeks later...
Posted

The best way is to define the document language on the html element rather than with a meta tag:

 

 

And to leave the content-type meta tag as before:

 

 

You should always ensure you define both the content language and the content-type (charset) on all pages.

 

[unnecessary spam link deleted]

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...