Forum Moderators: open

Message Too Old, No Replies

which content type/charset to use

         

leoo24

10:56 am on Feb 22, 2003 (gmt 0)

10+ Year Member



i've been trying to figure this out for a few days now, what content type should i put on my pages, up until a few days ago i had no content type and then went to validate them and it wouldnt!.
Some of my pages have: "text/html; charset=windows-1252">
and then others have:
"text/html; charset=iso-8859-1">

cheers guys :)

hakre

11:22 am on Feb 22, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



hi leoo24,

the meta tag content type describes the content-type of your document. if you're using the windows-1252 charset, then you have to use this one. if you're using the iso-8859-1 charset, take the second. it's not an opinion which one is better, it's about which one you use. there are hundreds of charsets you can choose from, but they mainly depend on your operation system or the operation system of the server your pages are hosted.

if you're writing the files with windows notepad for example take the windows-1252 charset.

leoo24

1:53 pm on Feb 22, 2003 (gmt 0)

10+ Year Member



thanks for your reply hakre,
you have cleared it up a bit, i'm using 1st page 2000, an html editor, so i have sent them a question about which charset that would use.
I still don't understand what charset is though, and can't find an explanation either, as far as i was concerned i would have the doctype, html 4.01, and i would code my page using 4.01 and that was all.

tedster

3:42 pm on Feb 22, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Here's a reference from the W3C on how to specify character encoding [w3.org]. I've linked to a named anchor on the page, but the complete page is full of important info. This includes HTTP headers and server issues, HTML authoring software, using a meta declaration insead of a full DTD, character entity references, numeric character references, undisplayable characters -- lots of goodies here.

g1smd

8:59 pm on Feb 22, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The character encoding declaration is simply telling the web browser whether it should use the Western alphabet, the Greek alphabet, Cyrillic characters, Thai, Chinese, Japanese, or Arabic scripts, or some other alphabet or character format to display your web page on the screen.

The ISO-8859-1 option seems to be the most heavily used in the Western World.

.

Is that the same leoo24 that posts on htmlforums.com sometimes?

leoo24

9:27 pm on Feb 22, 2003 (gmt 0)

10+ Year Member



g1smd, well that's what i thought it was, but i just kept thinking naaa, it can't be that simple, there must be something else! I never used to be concerned with that cos my mate used to see to site maintenance, validity etc, now he's gone to australia and i'm stuck scratching my head about things i've not come across b4 lol
(which brings up the question did the bugger actually validate anything i did?)

yup as far as know i'm the only leoo24 on htmlforums :)

g1smd

11:18 pm on Feb 22, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You can still validate your files at [validator.w3.org...] without actually having a !DOCTYPE or character encoding declaration within your document.

The validator has selector boxes that force the validator into assuming which values you have set.

The most commonly used options (in the Western world) are:
DOCTYPE: HTML 4.01 Transitional
Character Encoding: ISO-8859-1