Charset

Discussion in 'HTML & Website Design' started by oo7ml, Feb 28, 2008.

  1. #1
    What exactly is a charset? I have googled it but i still don't understand how important it is.

    Which is the best one to use A or B ?

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

    or

    B:
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />


    thanks in advance
     
    oo7ml, Feb 28, 2008 IP
  2. pipes

    pipes Prominent Member

    Messages:
    12,766
    Likes Received:
    958
    Best Answers:
    0
    Trophy Points:
    360
    #2
    Id also like to understand this better too.
     
    pipes, Feb 28, 2008 IP
  3. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #3
    It's often a personal preference, unless you are also using XML in which case I think it MUST be utf-8. Both are charsets for Western Latin letters, though UTF-8 I know also does Cyrillic and Greek.

    More important is that what's in that meta tag matches up with what's on the hosting server AND how the document is saved (usually when you save a text document in something like Notepad, it asks you what charset you want).

    I like utf-8. There were some problems with UNIX systems long ago, which I think has been fixed, because there's a bit in front of utf-8 documents and it conflicted with the beginning of some shell scripts or something... or I'm talking out my butt... I forget.

    If you only use Western characters, like in English, pick one eeny-meeny miny mo and stick with it.
     
    Stomme poes, Feb 28, 2008 IP
  4. oo7ml

    oo7ml Well-Known Member

    Messages:
    656
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    105
    #4
    Ok, thanks for your help... B it is... don't ask why... B = better lol... i hope thanks again
     
    oo7ml, Feb 28, 2008 IP
  5. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    437
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Dan Schulz, Feb 28, 2008 IP
  6. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #6
    This is what I meant with Unix systems. The BOM looked like the beginning of a shell script I think. Like #!/bin/bash-- the #! says "this is a script". However, I haven't had a problem so many this has been fixed.

    Another thing to keep in mind (if you want) is to try avoid using the & copy ; -style character entities if you are calling your page XHTML. Does it matter? No. But if I'm going to waste my time closing <img /> tags etc I might as well use & # number ; entities since XML only allows 5 (one of which isn't allowed in HTML, the &apos) which leaves you with 4.
    99.99999% of XHTML web pages will never ever ever be converted into an XML page or parsed by an XML parser but what the hell? So I limit my entities while using utf-8.
     
    Stomme poes, Feb 29, 2008 IP
  7. oo7ml

    oo7ml Well-Known Member

    Messages:
    656
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    105
    #7
    thanks guys
     
    oo7ml, Feb 29, 2008 IP
  8. pipes

    pipes Prominent Member

    Messages:
    12,766
    Likes Received:
    958
    Best Answers:
    0
    Trophy Points:
    360
    #8
    Say if a site was going to have various european translations (just an example) would the charset choice make a difference?

    Thanks for the info here by the way.
     
    pipes, Mar 1, 2008 IP
  9. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    437
    Best Answers:
    0
    Trophy Points:
    0
    #9
    In short, yes.
     
    Dan Schulz, Mar 1, 2008 IP
  10. pipes

    pipes Prominent Member

    Messages:
    12,766
    Likes Received:
    958
    Best Answers:
    0
    Trophy Points:
    360
    #10
    I need to read a bit further then, i haven't visited your suggested link yet Dan, will do later today, thanks.
     
    pipes, Mar 1, 2008 IP